Sign in to follow this  
Kingerthethird

SDL Icon Issue

Recommended Posts

I'm having an issue with both the Windows and Linux builds of my project. It's small, but I'd like to get it dealt with for polish. The problem is that I assign an icon for the window, but no matter what the window always has the default Icon. I've tried looking online to no avail, so I was curious if anyone here might have any insight. This is the function I'm using.
SDL_Surface* Window_Initialize( std::string strCaption, std::string strFilename )
{
    SDL_Surface* surScreen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    if( surScreen == NULL )
        return NULL;

    SDL_Surface* surIcon = Load_Image( strFilename );

    SDL_WM_SetCaption( &strCaption[0], &strCaption[0] );
    SDL_WM_SetIcon( surIcon, NULL );

    SDL_FreeSurface( surIcon );
    return surScreen;
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this