diff options
| author | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-06-19 22:06:40 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik.ramaekers@protonmail.com> | 2020-06-19 22:06:40 +0200 |
| commit | 09d17ee1cf95913715b9d96cc14a4ba4ac751947 (patch) | |
| tree | 56389774ca6a06c1e8fa836ae9734c3827139018 /src/windows/platform.c | |
| parent | 2f552b15aa9e0aa80488c00c2190e9a25b578f87 (diff) | |
cpu rendering on linux working
Diffstat (limited to 'src/windows/platform.c')
| -rw-r--r-- | src/windows/platform.c | 12 |
1 files changed, 11 insertions, 1 deletions
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)
{
|
