mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
windows: Remove references to GetVersionExA (thanks, Andrew Pilley!).
"GetVersionExA is deprecated in windows 8.1 and above's SDK, causing a warning when building against the win10 SDK. Attached patch cleans up the usage for a warning-free build. GetVersionExA was being used to test to see if SDL was running on win9x or winnt. A quick chat with Ryan on twitter suggested that SDL doesn't officially support win9x anymore, so the call to this can be outright removed. As an aside, replacing the call to GetVersionExA with VerifyVersionInfoA (the recommended path) would have been pointless, as VerifyVersionInfoA only supports VER_PLATFORM_WIN32_NT and doesn't officially support any other value for dwPlatformId currently. (And it's probable that win9x SDKs didn't have VerifyVersionInfo* in them anyway.)" Fixes Bugzilla #4019.
This commit is contained in:
parent
a452a08458
commit
7c667a6f7a
@ -446,16 +446,12 @@ IME_GetReadingString(SDL_VideoData *videodata, HWND hwnd)
|
|||||||
INT err = 0;
|
INT err = 0;
|
||||||
BOOL vertical = FALSE;
|
BOOL vertical = FALSE;
|
||||||
UINT maxuilen = 0;
|
UINT maxuilen = 0;
|
||||||
static OSVERSIONINFOA osversion;
|
|
||||||
|
|
||||||
if (videodata->ime_uiless)
|
if (videodata->ime_uiless)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
videodata->ime_readingstring[0] = 0;
|
videodata->ime_readingstring[0] = 0;
|
||||||
if (!osversion.dwOSVersionInfoSize) {
|
|
||||||
osversion.dwOSVersionInfoSize = sizeof(osversion);
|
|
||||||
GetVersionExA(&osversion);
|
|
||||||
}
|
|
||||||
id = IME_GetId(videodata, 0);
|
id = IME_GetId(videodata, 0);
|
||||||
if (!id)
|
if (!id)
|
||||||
return;
|
return;
|
||||||
@ -516,9 +512,6 @@ IME_GetReadingString(SDL_VideoData *videodata, HWND hwnd)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IMEID_CHS_VER42:
|
case IMEID_CHS_VER42:
|
||||||
if (osversion.dwPlatformId != VER_PLATFORM_WIN32_NT)
|
|
||||||
break;
|
|
||||||
|
|
||||||
p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 1*4 + 1*4 + 6*4);
|
p = *(LPBYTE *)((LPBYTE)videodata->ImmLockIMCC(lpimc->hPrivate) + 1*4 + 1*4 + 6*4);
|
||||||
if (!p)
|
if (!p)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user