# HG changeset patch # User Sam # Date 1677326202 -25200 # Node ID 0a63d1d7ee2231cab43dd89ae9677e367043aae8 # Parent 84514c05e83f7aba87c8cf58aa6eeff0aeabc15e fix: some windows issues diff -r 84514c05e83f -r 0a63d1d7ee22 src/semicongine/platform/windows/win32.nim --- a/src/semicongine/platform/windows/win32.nim Sat Feb 25 01:21:29 2023 +0700 +++ b/src/semicongine/platform/windows/win32.nim Sat Feb 25 18:56:42 2023 +0700 @@ -15,7 +15,7 @@ template checkWin32Result*(call: untyped) = let value = call - if value != 0: + if value == 0: raise newException(Exception, "Win32 error: " & astToStr(call) & " returned " & $value) @@ -77,7 +77,7 @@ DWORD(0), windowClassName, windowName, - DWORD(WS_POPUP or WS_THICKFRAME or WS_SYSMENU or WS_MAXIMIZEBOX or WS_MINIMIZEBOX), + DWORD(WS_OVERLAPPEDWINDOW), CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HMENU(0), HINSTANCE(0), diff -r 84514c05e83f -r 0a63d1d7ee22 src/semicongine/shader.nim --- a/src/semicongine/shader.nim Sat Feb 25 01:21:29 2023 +0700 +++ b/src/semicongine/shader.nim Sat Feb 25 18:56:42 2023 +0700 @@ -27,7 +27,7 @@ command = command, input = input) if exitcode != 0: - raise newException(Exception, output) + raise newException(Exception, &"Running '{command}' produced exit code: {exitcode}" & output) return output @@ -65,7 +65,7 @@ when defined(linux): discard staticExecChecked(command = fmt"rm {shaderfile}") elif defined(windows): - discard staticExecChecked(command = fmt"del {shaderfile}") + discard staticExecChecked(command = fmt"cmd.exe /c del {shaderfile}") else: raise newException(Exception, "Unsupported operating system")