desmume icon indicating copy to clipboard operation
desmume copied to clipboard

Fix ensata sound register emulation.

Open dlbuhtig4096 opened this issue 1 year ago • 1 comments

Fix #850.

dlbuhtig4096 avatar Oct 20 '24 05:10 dlbuhtig4096

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.

dlbuhtig4096 avatar Oct 20 '24 13:10 dlbuhtig4096

Changed the behavior of OpenConsole() on Windows:

  • First, it attempts to AttachConsole(-1) and then uses AllocConsole() in case the first attempt fails.
  • Removed SetConsoleCP(GetACP()) and SetConsoleOutputCP(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.

dlbuhtig4096 avatar Oct 24 '24 14:10 dlbuhtig4096