diff options
-rw-r--r-- | src/graphicsmanager.cpp | 8 | ||||
-rw-r--r-- | src/gui/windowmanager.cpp | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index f45439937..0209e1eb8 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -685,7 +685,11 @@ void GraphicsManager::updatePlanformExtensions() if (!mwglGetExtensionsString) return; +#ifdef USE_SDL2 + HDC hdc = GetDC(info.info.win.window); +#else HDC hdc = GetDC(info.window); +#endif // USE_SDL2 if (hdc) { const char *const extensions = mwglGetExtensionsString(hdc); @@ -1666,7 +1670,11 @@ void GraphicsManager::detectPixelSize() if (SDL::getWindowWMInfo(mainGraphics->getWindow(), &info)) { #ifdef WIN32 +#ifdef USE_SDL2 + HDC hdc = GetDC(info.info.win.window); +#else HDC hdc = GetDC(info.window); +#endif // USE_SDL2 if (hdc) { // SetProcessDPIAware(); diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 15a536f15..79e6cb47c 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -449,11 +449,19 @@ void WindowManager::setIcon() if (icon) { #ifdef WIN64 +#ifdef USE_SDL2 + SetClassLongPtr(pInfo.info.win.window, +#else SetClassLongPtr(pInfo.window, +#endif // USE_SDL2 GCLP_HICON, reinterpret_cast<LONG_PTR>(icon)); #else // WIN64 +#ifdef USE_SDL2 + SetClassLong(pInfo.info.win.window, +#else SetClassLong(pInfo.window, +#endif // USE_SDL2 GCL_HICON, reinterpret_cast<LONG>(icon)); #endif // WIN64 |