diff options
author | Jordan Irwin <antumdeluge@gmail.com> | 2022-07-14 19:44:44 -0700 |
---|---|---|
committer | jak1 <jak1@themanaworld.org> | 2022-12-18 17:26:28 +0000 |
commit | ee778b910e1a6d06cdbeed8f8e536112bc0321f4 (patch) | |
tree | 3b61e082a1154af77ab54db5880c4bd9d11b96b1 /src/graphicsmanager.cpp | |
parent | 3ad822e4d2b4232c72d7b39185bbe660d40c0b45 (diff) | |
download | manaverse-ee778b910e1a6d06cdbeed8f8e536112bc0321f4.tar.gz manaverse-ee778b910e1a6d06cdbeed8f8e536112bc0321f4.tar.bz2 manaverse-ee778b910e1a6d06cdbeed8f8e536112bc0321f4.tar.xz manaverse-ee778b910e1a6d06cdbeed8f8e536112bc0321f4.zip |
fix HWND reference for SDL 2 builds
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 8 |
1 files changed, 8 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(); |