desmume
desmume copied to clipboard
Fix ensata sound register emulation.
Fix #850.
This PR should also fix the problem that soft reset is not working when Ensata emulation enabled now.
Please refers to comments on the source file for the details of the fix.
Changed the behavior of OpenConsole() on Windows:
- First, it attempts to
AttachConsole(-1)and then usesAllocConsole()in case the first attempt fails. - Removed
SetConsoleCP(GetACP())andSetConsoleOutputCP(GetACP())upon success.
Most first-party games were developed in Japan, where the log is encoded in CP932 (Shift JIS). For users not using Japanese Windows, setting the output encoding with GetACP() results in corrupted output. This change will allow users to set a custom code page for the output console beforehand.