This commit is contained in:
1 parent
c718d75774
commit
e36329ff0e
3 files changed
+10
-7
No files matched your search
@@ -453,7 +453,8 @@ async fn rename_minecraft_window(pid: u32, title: &str) {
|
|||||||
unsafe {
|
unsafe {
|
||||||
use windows::Win32::Foundation::LPARAM;
|
use windows::Win32::Foundation::LPARAM;
|
||||||
use windows::Win32::UI::WindowsAndMessaging::EnumWindows;
|
use windows::Win32::UI::WindowsAndMessaging::EnumWindows;
|
||||||
let _ = EnumWindows(Some(rename_if_owned_by_process), LPARAM(0));
|
let _ =
|
||||||
|
EnumWindows(Some(rename_if_owned_by_process), LPARAM(0));
|
||||||
}
|
}
|
||||||
RENAME_WINDOW_HANDLE.load(Ordering::Relaxed)
|
RENAME_WINDOW_HANDLE.load(Ordering::Relaxed)
|
||||||
};
|
};
|
||||||
@@ -478,7 +479,6 @@ async fn rename_minecraft_window(pid: u32, title: &str) {
|
|||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
async fn rename_minecraft_window(_pid: u32, _title: &str) {}
|
async fn rename_minecraft_window(_pid: u32, _title: &str) {}
|
||||||
|
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn lightweight_mode_frontend_ready(
|
pub fn lightweight_mode_frontend_ready(
|
||||||
app: AppHandle,
|
app: AppHandle,
|
||||||
|
|||||||
@@ -378,7 +378,8 @@ fn apply_launch_overrides_patch(
|
|||||||
overrides.game_resolution = game_resolution;
|
overrides.game_resolution = game_resolution;
|
||||||
}
|
}
|
||||||
if let Some(window_title) = patch.window_title {
|
if let Some(window_title) = patch.window_title {
|
||||||
overrides.window_title = window_title.filter(|value| !value.trim().is_empty());
|
overrides.window_title =
|
||||||
|
window_title.filter(|value| !value.trim().is_empty());
|
||||||
}
|
}
|
||||||
if let Some(mode) = patch.instance_mode {
|
if let Some(mode) = patch.instance_mode {
|
||||||
overrides.instance_mode = Some(mode);
|
overrides.instance_mode = Some(mode);
|
||||||
|
|||||||
@@ -689,10 +689,12 @@ impl Settings {
|
|||||||
.bind(self.custom_window_title_enabled)
|
.bind(self.custom_window_title_enabled)
|
||||||
.execute(exec)
|
.execute(exec)
|
||||||
.await?;
|
.await?;
|
||||||
sqlx::query("UPDATE settings SET default_window_title = ? WHERE id = 0")
|
sqlx::query(
|
||||||
.bind(self.default_window_title.trim())
|
"UPDATE settings SET default_window_title = ? WHERE id = 0",
|
||||||
.execute(exec)
|
)
|
||||||
.await?;
|
.bind(self.default_window_title.trim())
|
||||||
|
.execute(exec)
|
||||||
|
.await?;
|
||||||
sqlx::query("UPDATE settings SET mc_memory_optimize = ? WHERE id = 0")
|
sqlx::query("UPDATE settings SET mc_memory_optimize = ? WHERE id = 0")
|
||||||
.bind(self.memory.optimize_before_launch)
|
.bind(self.memory.optimize_before_launch)
|
||||||
.execute(exec)
|
.execute(exec)
|
||||||
|
|||||||
Reference in new issue
Block a user