foxygit / doom Log in
commit e9b9fefcf6b8163de9062430118fd626e79fa2c2
Author:     Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Tue Dec 18 09:19:22 2018 +0100
Commit:     Fabian Greffrath <fabian@greffrath.com>
CommitDate: Tue Dec 18 09:19:22 2018 +0100

    setup: fix building on Windows
---
 src/setup/execute.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/setup/execute.c b/src/setup/execute.c
index c71886d7..7a3faa21 100644
--- a/src/setup/execute.c
+++ b/src/setup/execute.c
@@ -27,6 +27,7 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <process.h>
+#include <shellapi.h>

 #else

@@ -146,7 +147,7 @@ void AddCmdLineParameter(execute_context_t *context, char *s, ...)
 boolean OpenFolder(const char *path)
 {
     // "If the function succeeds, it returns a value greater than 32."
-    return ShellExecute(NULL, "open", path, NULL, NULL, SW_SHOWDEFAULT) > 32;
+    return (int)ShellExecute(NULL, "open", path, NULL, NULL, SW_SHOWDEFAULT) > 32;
 }

 // Wait for the specified process to exit.  Returns the exit code.