SysAllocator<> would allocate at Cemu boot and then never release memory.
Now we have CafeStaticVar<owner, type, count> which is explicitly allocated/deallocated via the owner and can be tied to COS/IOSU module lifetime. This also works as an automatic reset when relaunching emulation.
If the command buffer was still empty, it wasn't replaced with a bigger one when a command didn't fit since it checked if it was smaller then the entire command pool, not the command buffer size itself.
Cemu fired the alarm right away instead, so a handler which sets its alarm again with a delay of zero looped forever. nsyskbd does this with a key repeat rate of zero.
OSSetPeriodicAlarm likewise ignores a period of zero or below.
Cemu was more lenient than the actual hardware and allowed both uniform registers and uniform blocks use at the same time. We now handle DX9_CONSTS set via GX2SetShaderMode correctly and will try to zero out the disabled uniform type
MH3G/MH3U has fragile multi-threaded use of swkbd and gets stuck if some operations complete too fast, specifically if SwkbdCreate completes quickly. For now we solve this by adding a sleep delay.
Also modernized and API registration and SwkbdInitLearnDic will create a valid empty dictionary now since MH3G tries to parse it
System RPLs are actually never loaded from the game's code directory. Verified on console.
Also do a minimalist check if the necessary files are dumped for erreula and swkbd, otherwise they will just crash on load.
Fixes#1977
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