Previous 199869 Revisions Next

r26871 Wednesday 1st January, 2014 at 17:18:51 UTC by Couriersud
SDL2.0: Fix relative mouse motion. This makes Missile Attack playable again with my Logitech marble trackball. [Couriersud]
[src/osd/sdl]window.c

trunk/src/osd/sdl/window.c
r26870r26871
615615   {
616616      //FIXME: SDL1.3: really broken: the whole SDL code
617617      //       will only work correct with relative mouse movements ...
618      //SDL_SetRelativeMouseMode
619618      if (!window->fullscreen && !sdlinput_should_hide_mouse(machine))
620619      {
621620         SDL_ShowCursor(SDL_ENABLE);
622621         if (SDL_GetWindowGrab(window->sdl_window ))
623622            SDL_SetWindowGrab(window->sdl_window, SDL_FALSE);
623           SDL_SetRelativeMouseMode(SDL_FALSE);
624624      }
625625      else
626626      {
627627         SDL_ShowCursor(SDL_DISABLE);
628628         if (!SDL_GetWindowGrab(window->sdl_window))
629629            SDL_SetWindowGrab(window->sdl_window, SDL_TRUE);
630            SDL_SetRelativeMouseMode(SDL_TRUE);
630631      }
631632      SDL_SetCursor(NULL); // Force an update in case the underlying driver has changed visibility
632633   }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team