diff options
Diffstat (limited to 'src/gui/windowmanager.cpp')
-rw-r--r-- | src/gui/windowmanager.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 346013639..e0172cca5 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -448,22 +448,21 @@ void WindowManager::setIcon() icon = LoadIcon(GetModuleHandle(nullptr), "A"); } - if (icon) - { -#ifdef WIN64 + #ifdef USE_SDL2 - SetClassLongPtr(pInfo.info.win.window, + const HWND& windowRef = pInfo.info.win.window; #else - SetClassLongPtr(pInfo.window, + const HWND& windowRef = pInfo.window; #endif // USE_SDL2 + + if (icon) + { +#ifdef WIN64 + SetClassLongPtr(windowRef, GCLP_HICON, reinterpret_cast<LONG_PTR>(icon)); #else // WIN64 -#ifdef USE_SDL2 - SetClassLong(pInfo.info.win.window, -#else - SetClassLong(pInfo.window, -#endif // USE_SDL2 + SetClassLong(windowRef, GCL_HICON, reinterpret_cast<LONG>(icon)); #endif // WIN64 |