When coreinit exit() is hit, then Cemu will only close when the game was launched directly via command line parameters (-g or -t). Otherwise it returns to the game list. In the case where Cemu closes it will forward the coreinit exit status code as it's own exit status code. This is useful for cases where Cemu is used as a CLI tool for testing homebrew
This is a first pass for now, more work is needed mostly for UI polish.
Changes in this commit:
- Debugger now exposes a thread-safe API. Previously everything would just access internal debugger state directly without regard for race conditions
- Reworked stepping logic to be more reliable. For example previously Cemu could get forever stuck in the middle of stepping to the next instruction
- Support for debugging while using multi-threaded CPU emulation. Originally the debugger was added when only single core support existed in Cemu. It was possible to debug multi-threaded before but it was very very prone to state corruptions.
- Debugger should now remember breakpoints correctly across sessions