diff --git a/src/dosbox.ico b/contrib/icons/dosbox-old.ico similarity index 100% rename from src/dosbox.ico rename to contrib/icons/dosbox-old.ico diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index 24fa8ff1..9989333d 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -470,12 +470,18 @@ static int watch_sdl_events(void *userdata, SDL_Event *e) } #endif -#if defined(MACOSX) - -// On macOS, as we use a nicer external icon packaged in App bundle. +/* On macOS, as we use a nicer external icon packaged in App bundle. + * + * Visual Studio bundles .ico file specified in winres.rc into the + * dosbox.exe file. + * + * Other OSes will either use svg icon bundled in the native package, or + * the window uploaded via SDL_SetWindowIcon below. + */ +#if defined(MACOSX) || defined(_MSC_VER) static void SetIcon() {} - #else + #include "icon.c" static void SetIcon() @@ -493,7 +499,8 @@ static void SetIcon() SDL_SetWindowIcon(sdl.window, s); SDL_FreeSurface(s); } -#endif // !defined(MACOSX) + +#endif static void KillSwitch(bool pressed) { if (!pressed) diff --git a/src/winres.rc b/src/winres.rc index 879b25d1..402e02e2 100644 --- a/src/winres.rc +++ b/src/winres.rc @@ -2,8 +2,7 @@ #include "winresrc.h" // icon resource -dosbox_ico ICON "dosbox.ico" - +DOSBOX_ICO ICON "..\\contrib\\icons\\dosbox-staging.ico" // version resource VS_VERSION_INFO VERSIONINFO