comparison src/video/cybergfx/SDL_amigamouse.c @ 1361:19418e4422cb

New configure-based build system. Still work in progress, but much improved
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Feb 2006 10:11:48 +0000
parents c71e05b4dc2e
children d910939febfa
comparison
equal deleted inserted replaced
1360:70a9cfb4cf1b 1361:19418e4422cb
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 #include "SDL_mouse.h" 23 #include "SDL_mouse.h"
24 #include "SDL_events_c.h" 24 #include "../../events/SDL_events_c.h"
25 #include "SDL_cursor_c.h" 25 #include "../SDL_cursor_c.h"
26 #include "SDL_amigamouse_c.h" 26 #include "SDL_amigamouse_c.h"
27 27
28 28
29 /* The implementation dependent data for the window manager cursor */ 29 /* The implementation dependent data for the window manager cursor */
30 30
71 } 71 }
72 72
73 /* Check to see if we need to enter or leave mouse relative mode */ 73 /* Check to see if we need to enter or leave mouse relative mode */
74 void amiga_CheckMouseMode(_THIS) 74 void amiga_CheckMouseMode(_THIS)
75 { 75 {
76 /* If the mouse is hidden and input is grabbed, we use relative mode */
77 #if 0
78 SDL_Lock_EventThread();
79 if ( !(SDL_cursorstate & CURSOR_VISIBLE) &&
80 (this->input_grab != SDL_GRAB_OFF) ) {
81 mouse_relative = 1;
82 X11_EnableDGAMouse(this);
83 if ( ! (using_dga & DGA_MOUSE) ) {
84 char *use_mouse_accel;
85
86 SDL_GetMouseState(&mouse_last.x, &mouse_last.y);
87 /* Use as raw mouse mickeys as possible */
88 XGetPointerControl(SDL_Display,
89 &mouse_accel.numerator,
90 &mouse_accel.denominator,
91 &mouse_accel.threshold);
92 use_mouse_accel = SDL_getenv("SDL_VIDEO_X11_MOUSEACCEL");
93 if ( use_mouse_accel ) {
94 SetMouseAccel(this, use_mouse_accel);
95 }
96 }
97 } else {
98 if ( mouse_relative ) {
99 if ( using_dga & DGA_MOUSE ) {
100 X11_DisableDGAMouse(this);
101 } else {
102 XChangePointerControl(SDL_Display, True, True,
103 mouse_accel.numerator,
104 mouse_accel.denominator,
105 mouse_accel.threshold);
106 }
107 mouse_relative = 0;
108 }
109 }
110 SDL_Unlock_EventThread();
111 #endif
112 } 76 }