#SDL 1.2 ShowCursor(SDL_DISABLE) not working as expected.

24 messages ยท Page 1 of 1 (latest)

cold driftBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

void pecan
#

!code test

cold driftBOT
void pecan
#

where is the embed?

#

I feel very stupid right now

cold driftBOT
#

@void pecan

Please Do Not Delete Posts!

Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.

void pecan
#

I'm trying to use SDL 1.2 for specific reasons, and I read the docs that in SDL 1.2, you can disable that default monochrome cursor that starts when you start SDL, but for some odd reason, Windows or SDL fails to redraw the cursor when I first launch the application. Resulting in an loading cursor that never changes. It only becomes normal once I move my cursor out of the window then put it back in again.

// Initializes SDL and all its subcomponents required for this program.
// Returns 1 if something fails.
int graphicsInit()
{
    // Init SDL
    if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO) == -1) 
    { 
        // Show Error if SDL fails to initialize.
        std::cerr << "Could not initialize SDL: " << SDL_GetError() << std::endl;
        return 1;
    }

    // Init SDL_image.
    int imgFlags = IMG_INIT_PNG;
    if (!(IMG_Init(imgFlags) & imgFlags)) 
    {
        // Show Error if SDL_image & SDL_image's png fails to initialize.
        std::cerr << "IMG_Init Error: " << IMG_GetError() << std::endl;
        return 1;
    }

    // Disables the default monochrome cursor.
    SDL_ShowCursor(SDL_DISABLE);

    // Set Video Mode.
    screen = SDL_SetVideoMode(config_screenPreferredWidth, config_screenPreferredHeight, config_screenPreferredColorQuality, SDL_SWSURFACE);
    if (screen == NULL) 
    {
        // Show Error if SDL fails to set Video Mode.
        std::cerr << "Couldn't set video mode: " << SDL_GetError() << std::endl;
        return 1;
    }

    // Set the window title
    SDL_WM_SetCaption("Test_Application", "test");
    // Display the menu.
    displayMenu(screen);
    return 0;
}
upper viper
#

why sdl 1?

topaz spindle
#

Yeah, any time someone claims to have "reasons" to do something weird, I'm immediately sus ๐Ÿ˜›

upper viper
#

is this windows vista?

#

not look like it

#

and not look like 7

void pecan
void pecan
topaz spindle
void pecan
#

And generally, these old operating systems are designed for weak computers, so I'd learn a lot of how to optimize C++ along the way

topaz spindle
void pecan
topaz spindle
#

I didn't really help, but you're welcome ๐Ÿ˜›

cold driftBOT
#

@void pecan Has your question been resolved? If so, type !solved :)