Fix patches/pinmame/0004: drop duplicate hunk conflicting with 0002
CI / Build wasm engine (push) Successful in 10m51s
CI / Build wasm engine (push) Successful in 10m51s
0004 was generated via a plain `git diff` against pinmame's pristine commit, which captured the *cumulative* diff for cpuexec.c - including patch 0002's time_fence stub hunk, not just 0004's own new cpu_run splitting code. Applying 0002 then 0004 in sequence (exactly what setup.sh does) failed: 0004's duplicate hunk expected pre-0002 context that no longer matched. Regenerated by diffing the current tree against a baseline with 0001-0003 already applied (matching the vpinball/0006 patch's existing approach) instead of against pristine directly. Verified: all 4 pinmame patches now apply cleanly in sequence against a fresh pristine checkout, and the result is byte-identical to the working tree that was actually built and tested. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SoSarxLgY33Kax5UNXcafZ
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/src/cpuexec.c b/src/cpuexec.c
|
||||
index ca7401f..0bfcbe7 100644
|
||||
index 07db6a1..0bfcbe7 100644
|
||||
--- a/src/cpuexec.c
|
||||
+++ b/src/cpuexec.c
|
||||
@@ -466,6 +466,65 @@ void cpu_run(void)
|
||||
@@ -68,41 +68,6 @@ index ca7401f..0bfcbe7 100644
|
||||
|
||||
|
||||
/*************************************
|
||||
@@ -943,6 +1002,34 @@ void time_fence_exit()
|
||||
}
|
||||
}
|
||||
|
||||
+#elif defined(__EMSCRIPTEN__)
|
||||
+
|
||||
+// No cross-thread wait primitive is used here: this build is single-threaded
|
||||
+// (see vpinball-wasm's README on why pthreads/SharedArrayBuffer are out of
|
||||
+// scope), and time_fence is purely an *optional* external-clock-sync feature
|
||||
+// (mirrored by Controller.TimeFence in controller.vbs) - reporting it as
|
||||
+// unsupported just means the emulator paces itself on its own internal
|
||||
+// timing instead of syncing to the host's clock, which is what every other
|
||||
+// platform this library runs on outside of this fence do anyway.
|
||||
+int time_fence_is_supported()
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void time_fence_post()
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int time_fence_wait(double secs)
|
||||
+{
|
||||
+ (void)secs;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void time_fence_exit()
|
||||
+{
|
||||
+}
|
||||
+
|
||||
#else
|
||||
|
||||
#include <semaphore.h>
|
||||
diff --git a/src/libpinmame/libpinmame.cpp b/src/libpinmame/libpinmame.cpp
|
||||
index 6966d77..755d762 100644
|
||||
--- a/src/libpinmame/libpinmame.cpp
|
||||
|
||||
Reference in New Issue
Block a user