Mouse dissappears in Linux
Zdravko

Having this code, how can I enable the mouse cursor under Linux environment?

allegro_init();
install_timer();
install_keyboard();
set_color_depth(8);
set_window_title("my program");
set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0);
BITMAP* buffer_=create_bitmap(800, 600);
show_mouse(screen);
blit(buffer_, screen, 0, 0, 0, 0, 800, 600);

Evert

Call enable_hardware_cursor() before show_mouse().
This will make X11 draw the mouse cursor for you, instead of using Allegro's software mouse. When dealing with a software mouse, you need to call scare_mouse() (or scare_mouse_area()) before blitting to the screen and unscare_mouse() afterwards.

Thread #583515. Printed from Allegro.cc