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
This commit is contained in:
stephena 2014-03-07 22:34:48 +00:00
parent 9da99f56d2
commit cde5c2ed9c
2 changed files with 1 additions and 49 deletions

View File

@ -295,54 +295,6 @@ bool FrameBufferSDL2::fullScreen() const
return false; 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) void FrameBufferSDL2::drawTIA(bool fullRedraw)
{ {

View File

@ -176,7 +176,7 @@ class FrameBufferSDL2 : public FrameBuffer
/** /**
Set the icon for the main SDL window. 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 This method should be called anytime the TIA needs to be redrawn