# HG changeset patch # User sam # Date 1712148800 -25200 # Node ID 87b72668d723ad7119a3d679ed81f3e3888576ef # Parent 84d9822c028d8d2ff345eb114b0a1985b8bfd933# Parent 799a630aa2bbcf8fdbc0efc84cf52894a138daf9 merge diff -r 84d9822c028d -r 87b72668d723 semicongine/platform/windows/window.nim --- a/semicongine/platform/windows/window.nim Wed Apr 03 19:49:42 2024 +0700 +++ b/semicongine/platform/windows/window.nim Wed Apr 03 19:53:20 2024 +0700 @@ -64,11 +64,11 @@ proc createWindow*(title: string): NativeWindow = - # when DEBUG: - # AllocConsole() - # discard stdin.reopen("conIN$", fmRead) - # discard stdout.reopen("conOUT$", fmWrite) - # discard stderr.reopen("conOUT$", fmWrite) + when DEBUG: + AllocConsole() + discard stdin.reopen("conIN$", fmRead) + discard stdout.reopen("conOUT$", fmWrite) + discard stderr.reopen("conOUT$", fmWrite) result.hInstance = HINSTANCE(GetModuleHandle(nil)) var @@ -100,7 +100,7 @@ result.g_wpPrev.length = UINT(sizeof(WINDOWPLACEMENT)) discard result.hwnd.ShowWindow(SW_SHOW) -proc setTitle*(window: NativeWindow, title: string) +proc setTitle*(window: NativeWindow, title: string) = window.hwnd.SetWindowText(T(title)) # inspired by the one and only, Raymond Chen