Skip to content

Commit

Permalink
Merge pull request louis-e#290 from TheComputerGuy96/misc-fixes
Browse files Browse the repository at this point in the history
Miscellaneous fixes
  • Loading branch information
louis-e authored Jan 15, 2025
2 parents f7e917e + 8221da4 commit 3084985
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions gui-src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ button:hover {
button {
color: #ffffff;
background-color: #0f0f0f98;
border-style: inherit;
}
button:active {
background-color: #0f0f0f69;
Expand Down
9 changes: 7 additions & 2 deletions gui-src/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { licenseText } from './license.js';

const { invoke } = window.__TAURI__.core;
if (window.__TAURI__) {
const { invoke } = window.__TAURI__.core;
} else {
function dummyFunc() {}
window.__TAURI__ = { event: { listen: dummyFunc } };
}

// Initialize elements and start the demo progress
window.addEventListener("DOMContentLoaded", async () => {
Expand Down Expand Up @@ -447,7 +452,7 @@ function handleWorldSelectionError(errorCode) {
document.getElementById('selected-world').textContent = errorMessage;
document.getElementById('selected-world').style.color = "#fa7878";
worldPath = "";
console.error(error);
console.error(errorCode);
}

let generationButtonEnabled = true;
Expand Down
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ fn main() {
std::process::exit(1);
}));

// Workaround WebKit2GTK issue with NVIDIA drivers (likely explicit sync related?)
// Source: https://github.com/tauri-apps/tauri/issues/10702 (TODO: Remove this later)
#[cfg(target_os = "linux")]
unsafe {
env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
}

tauri::Builder::default()
.plugin(
LogBuilder::default()
Expand Down

0 comments on commit 3084985

Please sign in to comment.