changeset 552:091a93eb29bb

Merge branch 'main' of github.com:saemideluxe/semicongine
author Sam <sam@basx.dev>
date Mon, 27 Feb 2023 00:05:26 +0700
parents 0d20af721f88 (current diff) 0a63d1d7ee22 (diff)
children 592b28cf65f0
files src/semicongine/shader.nim
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/semicongine/platform/windows/win32.nim	Mon Feb 27 00:04:30 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),
--- a/src/semicongine/shader.nim	Mon Feb 27 00:04:30 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")