Sorry for the new thread, for some reason there is no any "reply" button in that thread.
The problem was:
Windows - when display scaling is enabled, al_get_mouse_state returns co-ordinates of the unscaled resolution, while the fullscreen window is created using the scaled resolution. This makes cursor being stuck in the upper-left corner of the screen.
To reproduce this, use ex_mouse with the FULLSCREEN_WINDOW display.
I've finally used a workaround to fix the problem.
I've added a static float DPIMult that is initialized in init_mouse in wmouse.c
Then I use this value in generate_mouse_event
event.mouse.x = DPIMult*(float)x; event.mouse.y = DPIMult*(float)y;
set_mouse_xy
if (dx || dy) { mouse_state.x = (float)x/DPIMult; mouse_state.y = (float)y/DPIMult; generate_mouse_event( ALLEGRO_EVENT_MOUSE_WARPED, mouse_state.x, mouse_state.y, mouse_state.z, mouse_state.w, dx, dy, 0, 0, 0, (void*)win_disp); }
and get_mouse_state
static void get_mouse_state(ALLEGRO_MOUSE_STATE *ret_state) { _al_event_source_lock(&the_mouse.es); *ret_state = mouse_state; ret_state->x = DPIMult*(float)mouse_state.x; ret_state->y = DPIMult*(float)mouse_state.y; _al_event_source_unlock(&the_mouse.es); }
After these modifications it works fine.
Note that I recently made the change that disabled the scaling for Allegro apps to avoid this issue. I'll try out your fix and see if it fixes it to me, so that if you for some reason want to use scaling, at least it'll work ok.
I would better to disable scaling. Where I can find that piece of code? I need to retrofit it into 5.1.9...
This is the commit: https://github.com/liballeg/allegro5/commit/66eb5e9c3482223e6898f4ee5be084d35fc35639
Also, I've been trying to reproduce your OSX fullscreen window issues without much success. Could you tell me what OSX version you were using and if your bug also happened with something like ex_projection2 example (press space to make it go fullscreen).