mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
Fix console output on Windows (#2122)
Co-authored-by: pants64DS <pants64DS@users.noreply.github.com>
This commit is contained in:
parent
757a608b6e
commit
76c2723f5c
@ -361,6 +361,12 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
int CALLBACK WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int cmdshow)
|
int CALLBACK WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int cmdshow)
|
||||||
{
|
{
|
||||||
|
if (AttachConsole(ATTACH_PARENT_PROCESS) && GetStdHandle(STD_OUTPUT_HANDLE))
|
||||||
|
{
|
||||||
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
|
|
||||||
int ret = main(__argc, __argv);
|
int ret = main(__argc, __argv);
|
||||||
|
|
||||||
printf("\n\n>");
|
printf("\n\n>");
|
||||||
|
Loading…
Reference in New Issue
Block a user