diff options
Diffstat (limited to 'src/gui/windowmanager.cpp')
-rw-r--r-- | src/gui/windowmanager.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index e0172cca5..d6f7bedbb 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -1,10 +1,11 @@ /* - * The ManaPlus Client + * The ManaVerse Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers - * Copyright (C) 2011-2019 The ManaPlus Developers + * Copyright (C) 2011-2020 The ManaPlus Developers + * Copyright (C) 2020-2025 The ManaVerse Developers * - * This file is part of The ManaPlus Client. + * This file is part of The ManaVerse Client. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -90,9 +91,9 @@ PRAGMA48(GCC diagnostic ignored "-Wshadow") #include <SDL_image.h> -#ifdef WIN32 +#ifdef _WIN32 #include <SDL_syswm.h> -#endif // WIN32 +#endif // _WIN32 PRAGMA48(GCC diagnostic pop) #include "debug.h" @@ -418,17 +419,17 @@ void WindowManager::setIcon() { #if !defined(ANDROID) && !defined(__SWITCH__) std::string iconFile = branding.getValue("appIcon", "icons/manaplus"); -#ifdef WIN32 +#ifdef _WIN32 iconFile.append(".ico"); -#else // WIN32 +#else // _WIN32 iconFile.append(".png"); -#endif // WIN32 +#endif // _WIN32 iconFile = VirtFs::getPath(iconFile); logger->log("Loading icon from file: %s", iconFile.c_str()); -#ifdef WIN32 +#ifdef _WIN32 static SDL_SysWMinfo pInfo; if (mainGraphics) SDL::getWindowWMInfo(mainGraphics->getWindow(), &pInfo); @@ -457,17 +458,17 @@ void WindowManager::setIcon() if (icon) { -#ifdef WIN64 +#ifdef _WIN64 SetClassLongPtr(windowRef, GCLP_HICON, reinterpret_cast<LONG_PTR>(icon)); -#else // WIN64 +#else // _WIN64 SetClassLong(windowRef, GCL_HICON, reinterpret_cast<LONG>(icon)); -#endif // WIN64 +#endif // _WIN64 } -#else // WIN32 +#else // _WIN32 mIcon = MIMG_Load(iconFile.c_str()); if (mIcon != nullptr) @@ -481,7 +482,7 @@ void WindowManager::setIcon() SDL::SetWindowIcon(mainGraphics->getWindow(), mIcon); } -#endif // WIN32 +#endif // _WIN32 #endif // ANDROID } |