bitmaps flicker when moving the mouse
DuncanShine

I have this bit of code that's saving the position of the mouse cursor, but it's causing my bitmaps to flicker.

    ALLEGRO_MOUSE_STATE mouseState;      
    
    mouseX = al_get_mouse_state_axis(&mouseState, 0);
    mouseY = al_get_mouse_state_axis(&mouseState, 1);

I've also tried using events to save the position of the cursor, but that still causes flickering.

DanielH

what is your drawing code? I doubt this code is the culprit.

Edgar Reynaldo

flickering.

That means it is changing position rapidly. That means the values you're reading are changing rapidly. Did you get the mouse state before testing the values?

Thread #618078. Printed from Allegro.cc