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/taskbar | |
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/taskbar')
-rw-r--r-- | backends/taskbar/win32/win32-taskbar.cpp | 15 | ||||
-rw-r--r-- | backends/taskbar/win32/win32-taskbar.h | 6 |
2 files changed, 14 insertions, 7 deletions
diff --git a/backends/taskbar/win32/win32-taskbar.cpp b/backends/taskbar/win32/win32-taskbar.cpp index 5c9105b0eb..322ddc4c67 100644 --- a/backends/taskbar/win32/win32-taskbar.cpp +++ b/backends/taskbar/win32/win32-taskbar.cpp @@ -62,7 +62,7 @@ // System.Title property key, values taken from http://msdn.microsoft.com/en-us/library/bb787584.aspx const PROPERTYKEY PKEY_Title = { /* fmtid = */ { 0xF29F85E0, 0x4FF9, 0x1068, { 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9 } }, /* propID = */ 2 }; -Win32TaskbarManager::Win32TaskbarManager() : _taskbar(NULL), _count(0), _icon(NULL) { +Win32TaskbarManager::Win32TaskbarManager(SdlWindow *window) : _window(window), _taskbar(NULL), _count(0), _icon(NULL) { // Do nothing if not running on Windows 7 or later if (!isWin7OrLater()) return; @@ -408,12 +408,15 @@ LPWSTR Win32TaskbarManager::ansiToUnicode(const char *s) { HWND Win32TaskbarManager::getHwnd() { SDL_SysWMinfo wmi; - SDL_VERSION(&wmi.version); - - if(!SDL_GetWMInfo(&wmi)) + if (_window->getSDLWMInformation(&wmi)) { +#if SDL_VERSION_ATLEAST(2, 0, 0) + return wmi.info.win.window; +#else + return wmi.window; +#endif + } else { return NULL; - - return wmi.window; + } } #endif diff --git a/backends/taskbar/win32/win32-taskbar.h b/backends/taskbar/win32/win32-taskbar.h index 36415c1c57..a6d1b49213 100644 --- a/backends/taskbar/win32/win32-taskbar.h +++ b/backends/taskbar/win32/win32-taskbar.h @@ -25,6 +25,8 @@ #if defined(WIN32) && defined(USE_TASKBAR) +#include "backends/platform/sdl/sdl-window.h" + #include "common/str.h" #include "common/taskbar.h" @@ -32,7 +34,7 @@ struct ITaskbarList3; class Win32TaskbarManager : public Common::TaskbarManager { public: - Win32TaskbarManager(); + Win32TaskbarManager(SdlWindow *window); virtual ~Win32TaskbarManager(); virtual void setOverlayIcon(const Common::String &name, const Common::String &description); @@ -44,6 +46,8 @@ public: virtual void clearError(); private: + SdlWindow *_window; + ITaskbarList3 *_taskbar; // Count handling |