comparison 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
comparison
equal deleted inserted replaced
1419:36a5068bf7df 1420:2405517b5eab
51 #include "SDL_gemvideo.h" 51 #include "SDL_gemvideo.h"
52 #include "SDL_gemevents_c.h" 52 #include "SDL_gemevents_c.h"
53 #include "SDL_gemmouse_c.h" 53 #include "SDL_gemmouse_c.h"
54 #include "SDL_gemwm_c.h" 54 #include "SDL_gemwm_c.h"
55 #include "../ataricommon/SDL_xbiosevents_c.h" 55 #include "../ataricommon/SDL_xbiosevents_c.h"
56 #include "../ataricommon/SDL_ataridevmouse_c.h"
56 57
57 /* Defines */ 58 /* Defines */
58 59
59 /*#define DEBUG_VIDEO_GEM 1*/ 60 /*#define DEBUG_VIDEO_GEM 1*/
60 61
187 device->GL_GetAttribute = SDL_AtariGL_GetAttribute; 188 device->GL_GetAttribute = SDL_AtariGL_GetAttribute;
188 device->GL_MakeCurrent = SDL_AtariGL_MakeCurrent; 189 device->GL_MakeCurrent = SDL_AtariGL_MakeCurrent;
189 device->GL_SwapBuffers = GEM_GL_SwapBuffers; 190 device->GL_SwapBuffers = GEM_GL_SwapBuffers;
190 #endif 191 #endif
191 192
192 /* Joystick + Mouse relative motion */ 193 device->hidden->use_dev_mouse =
193 vectors_mask = ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS; 194 (SDL_AtariDevMouse_Open()!=0) ? SDL_TRUE : SDL_FALSE;
195
196 vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS; /* XBIOS joystick events */
197 if (!(device->hidden->use_dev_mouse)) {
198 vectors_mask |= ATARI_XBIOS_MOUSEEVENTS; /* XBIOS mouse events */
199 }
194 if (Getcookie(C_MiNT, &dummy)==C_FOUND) { 200 if (Getcookie(C_MiNT, &dummy)==C_FOUND) {
195 vectors_mask = 0; 201 vectors_mask = 0;
196 } 202 }
197 203
198 SDL_AtariXbios_InstallVectors(vectors_mask); 204 SDL_AtariXbios_InstallVectors(vectors_mask);
1092 another SDL video routine -- notably UpdateRects. 1098 another SDL video routine -- notably UpdateRects.
1093 */ 1099 */
1094 void GEM_VideoQuit(_THIS) 1100 void GEM_VideoQuit(_THIS)
1095 { 1101 {
1096 SDL_AtariXbios_RestoreVectors(); 1102 SDL_AtariXbios_RestoreVectors();
1103 if (GEM_usedevmouse) {
1104 SDL_AtariDevMouse_Close();
1105 }
1097 1106
1098 GEM_FreeBuffers(this); 1107 GEM_FreeBuffers(this);
1099 1108
1100 #if SDL_VIDEO_OPENGL 1109 #if SDL_VIDEO_OPENGL
1101 if (gl_active) { 1110 if (gl_active) {