# HG changeset patch # User sam # Date 1712148800 -25200 # Node ID 4abb83d6af002b342a9170c913f61a35ad619a05 # Parent 2fc5723a5635b238e3ca5ccba1d216ed8fa0a63c# Parent 9d362151c78f89d0ccae5e5d5a7a34f3959d55c3 merge diff -r 2fc5723a5635 -r 4abb83d6af00 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