mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 05:05:56 +00:00
Note what each 2026-10 frame time fix needs on a Linux host: the SleepThread spin is for the Windows timer only, the file I/O moved off the game and render threads is portable with fsync in place of FlushFileBuffers, the slow-present profiler is Windows-only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b12bbe7705
commit
42b73c4098
2 files changed
+18
-1
No files matched your search
+2
-1
@@ -1333,7 +1333,8 @@ void kern_run_on_guest_main(void (*fn)(Cpu *c)) {
|
||||
|
||||
// The high-resolution waitable timer ends a wait 0.3-0.5 ms late at best: the SDK's 20 us polling sleeps (main thread
|
||||
// and job workers, about 1.5 per frame each) took 460-515 us. Sleeps up to SLEEP_SPIN_NS spin on the performance
|
||||
// counter instead; the virtual core is already given up.
|
||||
// counter instead; the virtual core is already given up. Linux: clock_nanosleep wakes within about 50 us (timer slack),
|
||||
// so a Linux host spins only below that, or not at all (docs/backlog.md item 35).
|
||||
#define SLEEP_SPIN_NS 1000000
|
||||
static void sleep_ns(RtThread *t, int64_t ns) {
|
||||
if (ns <= SLEEP_SPIN_NS) {
|
||||
|
||||
Reference in new issue
Block a user