# HG changeset patch # User Sam # Date 1677326202 -25200 # Node ID 01ba9f715b7ea6484e569c4847f1a1979d86c800 # Parent d911cacce29e96d29a3e2d4ecfdb283799ff9c9d fix: some windows issues diff -r d911cacce29e -r 01ba9f715b7e 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 d911cacce29e -r 01ba9f715b7e 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")