We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4019 - SDL_windowskeyboard.c uses GetVersionExA which is deprecated past win8.1
Summary: SDL_windowskeyboard.c uses GetVersionExA which is deprecated past win8.1
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86 Windows 10
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
: 4031 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-01 19:25 UTC by Andrew
Modified: 2018-01-08 05:41 UTC (History)
1 user (show)

See Also:


Attachments
Remove references to GetVersionExA as it's deprecated in win8.x and only used to test if SDL is running on win9x (978 bytes, patch)
2018-01-01 19:25 UTC, Andrew
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2018-01-01 19:25:15 UTC
Created attachment 3123 [details]
Remove references to GetVersionExA as it's deprecated in win8.x and only used to test if SDL is running on win9x

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.) 

Patch attached with the quick cleanup.
Comment 1 Sam Lantinga 2018-01-03 18:04:05 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/454f6dc9cb85
Comment 2 Ryan C. Gordon 2018-01-08 05:41:33 UTC
*** Bug 4031 has been marked as a duplicate of this bug. ***