Mercurial > sdl-ios-xcode
diff src/video/gem/SDL_gemvideo.c @ 1420:2405517b5eab
Added preliminary support for MiNT /dev/mouse driver (disabled atm)
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Thu, 23 Feb 2006 21:51:10 +0000 |
parents | a8181c4040b8 |
children | 8d9bb0cf2c2a |
line wrap: on
line diff
--- a/src/video/gem/SDL_gemvideo.c Thu Feb 23 04:16:08 2006 +0000 +++ b/src/video/gem/SDL_gemvideo.c Thu Feb 23 21:51:10 2006 +0000 @@ -53,6 +53,7 @@ #include "SDL_gemmouse_c.h" #include "SDL_gemwm_c.h" #include "../ataricommon/SDL_xbiosevents_c.h" +#include "../ataricommon/SDL_ataridevmouse_c.h" /* Defines */ @@ -189,8 +190,13 @@ device->GL_SwapBuffers = GEM_GL_SwapBuffers; #endif - /* Joystick + Mouse relative motion */ - vectors_mask = ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS; + device->hidden->use_dev_mouse = + (SDL_AtariDevMouse_Open()!=0) ? SDL_TRUE : SDL_FALSE; + + vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS; /* XBIOS joystick events */ + if (!(device->hidden->use_dev_mouse)) { + vectors_mask |= ATARI_XBIOS_MOUSEEVENTS; /* XBIOS mouse events */ + } if (Getcookie(C_MiNT, &dummy)==C_FOUND) { vectors_mask = 0; } @@ -1094,6 +1100,9 @@ void GEM_VideoQuit(_THIS) { SDL_AtariXbios_RestoreVectors(); + if (GEM_usedevmouse) { + SDL_AtariDevMouse_Close(); + } GEM_FreeBuffers(this);