Commit Graph
21 Commits
Author SHA1 Message Date
libretroadmin 9f13f0f051 Remove sleeps and timed polling from the emulation and render paths
The core no longer sleeps to pace itself: the frontend runs retro_run at
its own rate, so the frame throttle, the idle-vblank delay and the real
clock sync event (and its core option) are gone, and a stepping CPU hands
straight back instead of waiting 2 ms. Waits that polled now park on a
lock-free eventcount through Common/Thread/ParkingLot and are woken by
whoever changes the state: a paused GL emu thread, which also queues a
marker behind its last frame so pausing runs the render queue up to it
instead of polling; async I/O results; the software renderer when its
queue is full; Vulkan pipeline compiles; and debugger requests once
stepping ends. Boot joins the loader thread, cache shutdown joins its
read-ahead thread, and the slow-I/O simulation is removed.

The path browser, the HTTP and WebSocket servers, the Windows console and
the game info cache are left out of the core build. libretro/test gains
lrgltest, which drives the GL backend on a surfaceless EGL context through
every path that pauses or stops the emu thread; run.sh and the image
checks CI job run it on llvmpipe.
2026-10-08 17:58:42 +02:00
Henrik Rydgård aa2c9e2408 Add sanity check to frame timing 2026-02-19 00:35:33 +01:00
Henrik Rydgård 99c53f609a Remove debug assert that gets triggered in headless mode 2025-11-04 23:39:56 +01:00
Henrik Rydgård 7cc4a0f3a3 Add more accurate sleep function (well, not more accurate on Windows unfortunately) 2025-10-21 12:11:23 +02:00
Henrik Rydgård 042cf87248 Rework the present mode settings, refactor. 2025-10-20 21:28:38 +02:00
Henrik Rydgård 176c55da25 Remove unused "interval" concept from presentation mode 2025-10-19 18:18:06 +02:00
Henrik Rydgård 1f96c3a2b3 Switch to sleep_precise for WaitUntil() which is used for frame timing.
This can improve frame pacing slightly, not just on Windows actually.
2025-03-01 19:13:06 +01:00
Henrik Rydgård f66ea2f63e Add a bunch of restrictions when online (no savestate, no speed control) 2025-01-13 19:33:48 +01:00
Henrik Rydgård 3e198c53b2 More include cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård 5a3eeb9d9b ImDebugger: Fix issue with HLE Modules window always showing, more granular sleep logging 2024-11-21 15:48:18 +01:00
Henrik Rydgård 59a56d66c7 Add a "reason" argument to sleep_ms().
sleep_ms() should generally be avoided when possible. This can be used to try
to track down unnecessary sleeps by adding some logging.

This commit on its own doesn't actually add any logging.
2024-11-21 15:28:51 +01:00
Henrik Rydgård 9979372a97 Assorted paranoia, get rid of an allocation in the audio loop 2024-01-29 10:37:38 +01:00
Henrik Rydgård a2e7712126 Crashfix in JIT disassembly UI. Add sanity check in WaitUntil 2024-01-27 13:28:09 +01:00
Henrik Rydgård 4956477f63 Paranoia 2024-01-15 12:35:04 +01:00
Henrik Rydgård e1f1af6223 Defer waits.
Add sanity check
2023-12-18 17:15:56 +01:00
Henrik Rydgård 97e0f6dc94 Prepare for deferred waits 2023-12-18 17:15:56 +01:00
Henrik Rydgård ef2d7a810a Add comments, move some stuff around, get rid of some indentation. No functionality change. 2023-08-15 18:34:06 +02:00
Henrik Rydgård 1b2cffe632 Address feedback 2023-08-14 11:06:20 +02:00
Henrik Rydgård aadb700505 Fix turning off VSync on Android, logic fix 2023-08-14 11:02:29 +02:00
Henrik Rydgård ff6e118fff Get rid of a lot of ifdefs around presentation mode. Instead, set things dynamically. 2023-08-14 11:02:29 +02:00
Henrik Rydgård 7bb1914fd3 Add FrameTiming.cpp/h (with no real contents) 2023-08-13 17:57:43 +02:00