Skip to content

Commit 4e8770b

Browse files
committed
SDL: fix path setup
1 parent a89fa73 commit 4e8770b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/platform/sdl/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void printKeywords() {
211211

212212
void setupAppPath(const char *path) {
213213
g_appPath[0] = '\0';
214-
if (path[0] == '/' || (path[1] == ':' && path[2] == '/')) {
214+
if (path[0] == '/' || (path[1] == ':' && path[2] == '\\')) {
215215
// full path or C:/
216216
strcpy(g_appPath, path);
217217
} else {

src/platform/sdl/syswm.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
extern char g_appPath[];
1616
extern int g_debugPort;
1717

18+
void appLog(const char *format, ...);
19+
1820
#if defined(_Win32)
1921
#include <SDL_syswm.h>
2022

@@ -49,7 +51,9 @@ void launchDebug(const char *file) {
4951
PROCESS_INFORMATION processInfo;
5052
char cmd[1024];
5153
sprintf(cmd, "-p %d -d %s", g_debugPort, file);
52-
CreateProcess(g_appPath, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo);
54+
if (!CreateProcess(g_appPath, cmd, NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo)) {
55+
appLog("failed to start %d %s %s\n", GetLastError(), g_appPath, cmd);
56+
}
5357
}
5458

5559
#else

0 commit comments

Comments
 (0)