mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 10:17:54 +00:00
Use GetTempPathW() instead of GetTempPath2W()
GetTempPath2() is only available on Windows 11 and Windows 10 systems with full updates. We want to be compatible back to earlier versions of Windows and the only difference between the two calls is the behavior for processes running as SYSTEM, which we don't expect for SDL applications using notifications.
This commit is contained in:
parent
7c60bcd83c
commit
0d971b1372
1 changed files with 2 additions and 2 deletions
|
|
@ -372,12 +372,12 @@ static WCHAR *SaveToastImage(SDL_Surface *icon)
|
|||
KillTimer(NULL, cleanup_timer_id);
|
||||
}
|
||||
|
||||
path_len = GetTempPath2W(0, NULL);
|
||||
path_len = GetTempPathW(0, NULL);
|
||||
if (!path_len) {
|
||||
return NULL;
|
||||
}
|
||||
temp_path = SDL_realloc(temp_path, (path_len + 1) * sizeof(WCHAR));
|
||||
path_len = GetTempPath2W((DWORD)path_len + 1, temp_path);
|
||||
path_len = GetTempPathW((DWORD)path_len + 1, temp_path);
|
||||
if (!path_len) {
|
||||
SDL_free(temp_path);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue