Sign in to follow this  

SDL Icon Issue

This topic is 3040 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

This topic is 3040 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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