Describe the bug
The emulation window will hang upon closing instead of exiting back to the config selector normally.
To Reproduce
Steps to reproduce the behavior:
Create any config and run the emulation.
Close the emulation window.
The window will hang for a few seconds and then exit back to the config selection UI.
Expected behavior
The emulation window should close normally.
Host machine
OS: macOS Monterey 12.6
Apple Silicon M2
Using the current dev branch.
using cmake -G "Xcode" and xcodebuild to compile.
Additional context
I did some initial digging and found out the problem is related to renderer_stop() (L691) in wx-sdl2-display.c.
Since on macOS, PCem won't use threads for rendering, it should never use renderCond to wait for the thread to quit.
The line in question has a ! before the preprocessor PCEM_RENDER_TIMER_LOOP. Might be a typo.
Fixing this ifdef block can fix this bug.
There are some other issues w.r.t. the cmake files while compiling for an Apple Silicon machine, I'll open a pull request for these.
Describe the bug The emulation window will hang upon closing instead of exiting back to the config selector normally.
To Reproduce Steps to reproduce the behavior:
Expected behavior The emulation window should close normally.
Host machine
dev
branch.cmake -G "Xcode"
andxcodebuild
to compile.Additional context I did some initial digging and found out the problem is related to
renderer_stop()
(L691) inwx-sdl2-display.c
. Since on macOS, PCem won't use threads for rendering, it should never userenderCond
to wait for the thread to quit. The line in question has a!
before the preprocessorPCEM_RENDER_TIMER_LOOP
. Might be a typo. Fixing this ifdef block can fix this bug.There are some other issues w.r.t. the cmake files while compiling for an Apple Silicon machine, I'll open a pull request for these.