Skip to content

Commit cb30e14

Browse files
game1024claude
andcommitted
chore: bump version to 3.2.2
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 436d8ee commit cb30e14

10 files changed

Lines changed: 21 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "openspeedy",
33
"private": true,
4-
"version": "3.2.1",
4+
"version": "3.2.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-bridge/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,14 @@ fn do_enable(pid: u32) -> Result<(), String> {
231231
let dll_wide = to_wide(OWN_SPEEDPATCH);
232232
unsafe {
233233
let h = LoadLibraryW(PCWSTR::from_raw(dll_wide.as_ptr())).map_err(|e| format!("LoadLibraryW: {e:?}"))?;
234+
235+
// Already enabled? — treat as success
236+
let sp_is_enabled: Option<unsafe extern "system" fn(u32) -> i32> =
237+
std::mem::transmute(GetProcAddress(h, s!("SP_IsEnabledById")));
238+
if let Some(f) = sp_is_enabled {
239+
if f(pid) != 0 { return Ok(()); }
240+
}
241+
234242
let sp_enable: Option<unsafe extern "system" fn(u32)> =
235243
std::mem::transmute(GetProcAddress(h, s!("SP_Enable")));
236244
sp_enable.ok_or("GetProcAddress SP_Enable failed")?(pid);

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openspeedy"
3-
version = "3.2.1"
3+
version = "3.2.2"
44
description = "Open Source Game Speed Controller"
55
authors = ["Game1024"]
66
edition = "2021"

src-tauri/binaries/bridge32.exe

0 Bytes
Binary file not shown.

src-tauri/binaries/bridge64.exe

512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src-tauri/src/bridge_client.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ fn pipe_command(pipe: &str, cmd: &str) -> Option<String> {
4545
let ok = unsafe { ReadFile(h, Some(&mut buf), Some(&mut nread), None) };
4646
unsafe { let _ = CloseHandle(h); }
4747

48-
if ok.is_err() || nread == 0 { return None; }
49-
Some(String::from_utf8_lossy(&buf[..nread as usize]).trim().to_string())
48+
if ok.is_err() || nread == 0 {
49+
eprintln!("[bridge] {cmd} → pipe read failed (err={:?}, nread={nread})", ok.err());
50+
return None;
51+
}
52+
let resp = String::from_utf8_lossy(&buf[..nread as usize]).trim().to_string();
53+
eprintln!("[bridge] {cmd} → {resp}");
54+
Some(resp)
5055
}
5156

5257
/// Check if bridge64 is running and responsive.

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "OpenSpeedy",
4-
"version": "3.2.1",
4+
"version": "3.2.2",
55
"identifier": "com.game1024.openspeedy",
66
"build": {
77
"beforeDevCommand": "npm run dev",

src/components/ProcessManager.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ export default function ProcessManager() {
173173
if (!wasInjected) {
174174
// First time inject
175175
setSpeedMap(prev => { const n = new Map(prev); n.set(pid, { injected: true, enabled: true, arch }); return n; });
176-
const ok = await invoke<boolean>("bridge_inject", { pid, arch }).catch(() => false);
176+
const ok = await invoke<boolean>("bridge_inject", { pid, arch }).catch((e) => { console.error("[toggle] bridge_inject error:", e); return false; });
177+
console.log("[toggle] bridge_inject result:", ok);
177178
if (!ok) {
178179
setSpeedMap(prev => { const n = new Map(prev); n.delete(pid); return n; });
179180
notify(t("process.injectFail"), "error");

0 commit comments

Comments
 (0)