diff options
author | Johannes Schickel | 2015-02-16 02:13:11 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-02-16 02:13:11 +0100 |
commit | 3745ddbefd6ab401458b862d124ebe80592a88bc (patch) | |
tree | 81b5cd632d4032bb7dc5e58b3f7a2642faad4ee4 /backends/platform/sdl/win32/win32-window.cpp | |
parent | 3f22c12c56572d7c0b46e734179255062f81f45c (diff) | |
download | scummvm-rg350-3745ddbefd6ab401458b862d124ebe80592a88bc.tar.gz scummvm-rg350-3745ddbefd6ab401458b862d124ebe80592a88bc.tar.bz2 scummvm-rg350-3745ddbefd6ab401458b862d124ebe80592a88bc.zip |
WIN32: Add experimental SDL2 support.
Based on changes by aquadran.
Diffstat (limited to 'backends/platform/sdl/win32/win32-window.cpp')
-rw-r--r-- | backends/platform/sdl/win32/win32-window.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/backends/platform/sdl/win32/win32-window.cpp b/backends/platform/sdl/win32/win32-window.cpp index a418d899d5..814c165f6f 100644 --- a/backends/platform/sdl/win32/win32-window.cpp +++ b/backends/platform/sdl/win32/win32-window.cpp @@ -37,11 +37,14 @@ void SdlWindow_Win32::setupIcon() { HMODULE handle = GetModuleHandle(NULL); HICON ico = LoadIcon(handle, MAKEINTRESOURCE(1001 /* IDI_ICON */)); if (ico) { - SDL_SysWMinfo wminfo; - SDL_VERSION(&wminfo.version); - if (SDL_GetWMInfo(&wminfo)) { + SDL_SysWMinfo wminfo; + if (getSDLWMInformation(&wminfo)) { // Replace the handle to the icon associated with the window class by our custom icon +#if SDL_VERSION_ATLEAST(2, 0, 0) + SetClassLongPtr(wminfo.info.win.window, GCLP_HICON, (ULONG_PTR)ico); +#else SetClassLongPtr(wminfo.window, GCLP_HICON, (ULONG_PTR)ico); +#endif // Since there wasn't any default icon, we can't use the return value from SetClassLong // to check for errors (it would be 0 in both cases: error or no previous value for the |