From cde5c2ed9c2848b868ecd940692156074860132e Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 7 Mar 2014 22:34:48 +0000 Subject: [PATCH] Disabled icon loading completely, since Linux/OSX didn't need it, and Windows uses the icon from the project file. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2868 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/common/FrameBufferSDL2.cxx | 48 ---------------------------------- src/common/FrameBufferSDL2.hxx | 2 +- 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx index 413ecd262..de552ae00 100644 --- a/src/common/FrameBufferSDL2.cxx +++ b/src/common/FrameBufferSDL2.cxx @@ -295,54 +295,6 @@ bool FrameBufferSDL2::fullScreen() const return false; } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FrameBufferSDL2::setWindowIcon() -{ -#if !defined(BSPF_MAC_OSX) && !defined(BSPF_UNIX) - #include "stella.xpm" // The Stella icon - - // Set the window icon - uInt32 w, h, ncols, nbytes; - uInt32 rgba[256], icon[32 * 32]; - - sscanf(stella_icon[0], "%u %u %u %u", &w, &h, &ncols, &nbytes); - if((w != 32) || (h != 32) || (ncols > 255) || (nbytes > 1)) - { - myOSystem->logMessage("ERROR: Couldn't load the application icon.", 0); - return; - } - - for(uInt32 i = 0; i < ncols; i++) - { - unsigned char code; - char color[32]; - uInt32 col; - - sscanf(stella_icon[1 + i], "%c c %s", &code, color); - if(!strcmp(color, "None")) - col = 0x00000000; - else if(!strcmp(color, "black")) - col = 0xFF000000; - else if (color[0] == '#') - { - sscanf(color + 1, "%06x", &col); - col |= 0xFF000000; - } - else - { - myOSystem->logMessage("ERROR: Couldn't load the application icon.", 0); - return; - } - rgba[code] = col; - } - - SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(icon, 32, 32, 32, - 32 * 4, 0xFF0000, 0x00FF00, 0x0000FF, 0xFF000000); - SDL_SetWindowIcon(myWindow, surface); - SDL_FreeSurface(surface); -#endif -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void FrameBufferSDL2::drawTIA(bool fullRedraw) { diff --git a/src/common/FrameBufferSDL2.hxx b/src/common/FrameBufferSDL2.hxx index 9633333b7..41b1338d3 100644 --- a/src/common/FrameBufferSDL2.hxx +++ b/src/common/FrameBufferSDL2.hxx @@ -176,7 +176,7 @@ class FrameBufferSDL2 : public FrameBuffer /** Set the icon for the main SDL window. */ - void setWindowIcon(); + void setWindowIcon() { } // Not currently needed on any supported systems /** This method should be called anytime the TIA needs to be redrawn