style: 窗口标题改动的 cargo fmt 格式修正
Sync source to CNB / Sync Git ref (push) Skipped

This commit is contained in:
AxTps committed 2026-10-10 21:30:15 +08:00
1 parent c718d75774
commit e36329ff0e
3 files changed
+10 -7

No files matched your search

+2 -2
View File
@@ -453,7 +453,8 @@ async fn rename_minecraft_window(pid: u32, title: &str) {
unsafe {
use windows::Win32::Foundation::LPARAM;
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)
};
@@ -478,7 +479,6 @@ async fn rename_minecraft_window(pid: u32, title: &str) {
#[cfg(not(target_os = "windows"))]
async fn rename_minecraft_window(_pid: u32, _title: &str) {}
#[tauri::command]
pub fn lightweight_mode_frontend_ready(
app: AppHandle,
@@ -378,7 +378,8 @@ fn apply_launch_overrides_patch(
overrides.game_resolution = game_resolution;
}
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 {
overrides.instance_mode = Some(mode);
+6 -4
View File
@@ -689,10 +689,12 @@ impl Settings {
.bind(self.custom_window_title_enabled)
.execute(exec)
.await?;
sqlx::query("UPDATE settings SET default_window_title = ? WHERE id = 0")
.bind(self.default_window_title.trim())
.execute(exec)
.await?;
sqlx::query(
"UPDATE settings SET default_window_title = ? WHERE id = 0",
)
.bind(self.default_window_title.trim())
.execute(exec)
.await?;
sqlx::query("UPDATE settings SET mc_memory_optimize = ? WHERE id = 0")
.bind(self.memory.optimize_before_launch)
.execute(exec)