commented on use of SDL_SetRelativeMouseMode

This commit is contained in:
David Ludwig 2017-08-23 20:56:54 -04:00
parent 7767f128e5
commit 3bae0bbda9
1 changed files with 5 additions and 0 deletions

View File

@ -2000,6 +2000,11 @@ static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event)
(display_type == DISPLAY_SCREEN && !is_full);
if (adjust_fullscreen) {
do_toggle_fullscreen();
// Utilizing SDL2's 'relative mouse mode', when in fullscreen,
// fixes an issue on OSX hosts whereby a fullscreen window
// can, in some cases, be dragged around.
// ( https://github.com/DavidLudwig/macemu/issues/19 )
if (is_fullscreen(sdl_window)) {
SDL_SetRelativeMouseMode(SDL_TRUE);
} else {