From 09d17ee1cf95913715b9d96cc14a4ba4ac751947 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 19 Jun 2020 22:06:40 +0200 Subject: cpu rendering on linux working --- src/windows/platform.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/windows/platform.c') diff --git a/src/windows/platform.c b/src/windows/platform.c index adbc053..06384d3 100644 --- a/src/windows/platform.c +++ b/src/windows/platform.c @@ -150,8 +150,18 @@ inline void platform_set_cursor(platform_window *window, cursor_type type) bool platform_directory_exists(char *path) { + char tmp[MAX_INPUT_LENGTH]; + string_copyn(tmp, path, MAX_INPUT_LENGTH); + + s32 len = strlen(tmp); + if (tmp[len-1] == '\\') + { + tmp[len-1] = 0; + } + + WIN32_FIND_DATA FindFileData; - HANDLE handle = FindFirstFile(path, &FindFileData) ; + HANDLE handle = FindFirstFile(tmp, &FindFileData) ; int found = handle != INVALID_HANDLE_VALUE; if(found) { -- cgit v1.2.3-70-g09d2