mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Buildfixes
This commit is contained in:
parent
ca7c374303
commit
4347517604
@ -73,21 +73,16 @@ char* get_temp_directory_alloc(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef LEGACY_WIN32
|
||||
DWORD pathLength;
|
||||
char *path;
|
||||
DWORD pathLength = GetTempPath(0, NULL) + 1;
|
||||
char *path = (char*)malloc(pathLength * sizeof(char));
|
||||
|
||||
pathLength = GetTempPath(0, NULL) + 1;
|
||||
path = (char*)malloc(pathLength * sizeof(char));
|
||||
path[pathLength - 1] = 0;
|
||||
GetTempPath(pathLength, path);
|
||||
return path;
|
||||
#else
|
||||
DWORD pathLength;
|
||||
wchar_t *wideStr;
|
||||
char *path;
|
||||
|
||||
pathLength = GetTempPathW(0, NULL) + 1;
|
||||
wideStr = (wchar_t*)malloc(pathLength * sizeof(wchar_t));
|
||||
DWORD pathLength = GetTempPathW(0, NULL) + 1;
|
||||
wchar_t *wideStr = (wchar_t*)malloc(pathLength * sizeof(wchar_t));
|
||||
wideStr[pathLength - 1] = 0;
|
||||
GetTempPathW(pathLength, wideStr);
|
||||
|
||||
@ -96,8 +91,7 @@ char* get_temp_directory_alloc(void)
|
||||
return path;
|
||||
#endif
|
||||
#else
|
||||
char *path;
|
||||
path = strcpy_alloc_force(getenv("TMPDIR");
|
||||
char *path = strcpy_alloc_force(getenv("TMPDIR");
|
||||
return path;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user