diff options
| author | Jeffery Myers <[email protected]> | 2022-01-17 09:05:48 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-17 18:05:48 +0100 |
| commit | bec27a6ebc05e3ff59f69a19ccf8ed268aa5fdd1 (patch) | |
| tree | 04305954d1876f2073666e0285b631be91e2841b /src | |
| parent | 61d0c71b3cc93cbde72002ddc8f6f1223eb99c52 (diff) | |
| download | raylib-bec27a6ebc05e3ff59f69a19ccf8ed268aa5fdd1.tar.gz raylib-bec27a6ebc05e3ff59f69a19ccf8ed268aa5fdd1.zip | |
[CORE] Fixes for GetApplicationDirectory on 32 bit windows builds (#2290)
* Fix a signature error with the windows calls in GetApplicationDirectory for 32 bit builds.
* break is better than loop var to -1
Diffstat (limited to 'src')
| -rw-r--r-- | src/rcore.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rcore.c b/src/rcore.c index 8e93709b..deaf32da 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -166,9 +166,9 @@ #ifndef MAX_PATH #define MAX_PATH 1025 #endif - unsigned int GetModuleFileNameA( void* hModule, const char* lpFilename, unsigned int nSize); - unsigned int GetModuleFileNameW( void* hModule, const unsigned short* lpFilename, unsigned int nSize); - int WideCharToMultiByte(unsigned int cp, unsigned long flags, const unsigned short *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); + __declspec(dllimport) unsigned long __stdcall GetModuleFileNameA(void* hModule, void* lpFilename, unsigned long nSize); + __declspec(dllimport) unsigned long __stdcall GetModuleFileNameW(void* hModule, void* lpFilename, unsigned long nSize); + __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, void* widestr, int cchwide, void* str, int cbmb, void* defchar, int* used_default); #elif defined(__linux__) #include <unistd.h> #elif defined(__APPLE__) @@ -3006,7 +3006,7 @@ const char *GetApplicationDirectory(void) if (appDir[i] == '\\') { appDir[i + 1] = '\0'; - i = -1; + break; } } } @@ -3027,7 +3027,7 @@ const char *GetApplicationDirectory(void) if (appDir[i] == '/') { appDir[i + 1] = '\0'; - i = -1; + break; } } } @@ -3047,7 +3047,7 @@ const char *GetApplicationDirectory(void) if (appDir[i] == '/') { appDir[i + 1] = '\0'; - i = -1; + break; } } } |
