# HG changeset patch # User Sam # Date 1677431126 -25200 # Node ID 2e9823f9193f9cb917a317fbbb518c1370a29916 # Parent 6e8037c1f6557cddc52848ada889bd4e214ca066# Parent 01ba9f715b7ea6484e569c4847f1a1979d86c800 Merge branch 'main' of github.com:saemideluxe/semicongine diff -r 6e8037c1f655 -r 2e9823f9193f src/semicongine/platform/windows/win32.nim --- a/src/semicongine/platform/windows/win32.nim Mon Feb 27 00:04:57 2023 +0700 +++ b/src/semicongine/platform/windows/win32.nim Mon Feb 27 00:05:26 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 6e8037c1f655 -r 2e9823f9193f src/semicongine/shader.nim --- a/src/semicongine/shader.nim Mon Feb 27 00:04:57 2023 +0700 +++ b/src/semicongine/shader.nim Mon Feb 27 00:05:26 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")