mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
994f497781
EmuWindow::PollEvents was called from the GPU thread (or the CPU thread in sync-GPU mode) when swapping buffers. It had three implementations: - In GRenderWindow, it didn't actually poll events, just set a flag and emit a signal to indicate that a frame was displayed. - In EmuWindow_SDL2_Hide, it did nothing. - In EmuWindow_SDL2, it did call SDL_PollEvents, but this is wrong because SDL_PollEvents is supposed to be called on the thread that set up video - in this case, the main thread, which was sleeping in a busyloop (regardless of whether sync-GPU was enabled). On macOS this causes a crash. To fix this: - Rename EmuWindow::PollEvents to OnFrameDisplayed, and give it a default implementation that does nothing. - In EmuWindow_SDL2, do not override OnFrameDisplayed, but instead have the main thread call SDL_WaitEvent in a loop. |
||
---|---|---|
.. | ||
gl_arb_decompiler.cpp | ||
gl_arb_decompiler.h | ||
gl_buffer_cache.cpp | ||
gl_buffer_cache.h | ||
gl_device.cpp | ||
gl_device.h | ||
gl_fence_manager.cpp | ||
gl_fence_manager.h | ||
gl_framebuffer_cache.cpp | ||
gl_framebuffer_cache.h | ||
gl_query_cache.cpp | ||
gl_query_cache.h | ||
gl_rasterizer.cpp | ||
gl_rasterizer.h | ||
gl_resource_manager.cpp | ||
gl_resource_manager.h | ||
gl_sampler_cache.cpp | ||
gl_sampler_cache.h | ||
gl_shader_cache.cpp | ||
gl_shader_cache.h | ||
gl_shader_decompiler.cpp | ||
gl_shader_decompiler.h | ||
gl_shader_disk_cache.cpp | ||
gl_shader_disk_cache.h | ||
gl_shader_manager.cpp | ||
gl_shader_manager.h | ||
gl_shader_util.cpp | ||
gl_shader_util.h | ||
gl_state_tracker.cpp | ||
gl_state_tracker.h | ||
gl_stream_buffer.cpp | ||
gl_stream_buffer.h | ||
gl_texture_cache.cpp | ||
gl_texture_cache.h | ||
maxwell_to_gl.h | ||
renderer_opengl.cpp | ||
renderer_opengl.h | ||
utils.cpp | ||
utils.h |