Mercurial > sdl-ios-xcode
comparison src/video/ataricommon/SDL_gemdosevents.c @ 305:9c6613983e85
Atari port cleanups from Patrice
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 10 Mar 2002 03:33:59 +0000 |
parents | f6ffac90895c |
children | b8d311d90021 |
comparison
equal
deleted
inserted
replaced
304:ec53caed9fb2 | 305:9c6613983e85 |
---|---|
39 #include "SDL.h" | 39 #include "SDL.h" |
40 #include "SDL_sysevents.h" | 40 #include "SDL_sysevents.h" |
41 #include "SDL_events_c.h" | 41 #include "SDL_events_c.h" |
42 | 42 |
43 #include "SDL_atarikeys.h" | 43 #include "SDL_atarikeys.h" |
44 #include "SDL_xbiosmouseevents_c.h" | 44 #include "SDL_xbiosevents_c.h" |
45 | 45 |
46 /* To save state of keyboard */ | 46 /* To save state of keyboard */ |
47 #define ATARIBIOS_MAXKEYS 128 | 47 #define ATARIBIOS_MAXKEYS 128 |
48 | 48 |
49 static unsigned char gemdos_currentkeyboard[ATARIBIOS_MAXKEYS]; | 49 static unsigned char gemdos_currentkeyboard[ATARIBIOS_MAXKEYS]; |
107 keymap[SCANCODE_LEFTSHIFT] = SDLK_LSHIFT; | 107 keymap[SCANCODE_LEFTSHIFT] = SDLK_LSHIFT; |
108 keymap[SCANCODE_RIGHTSHIFT] = SDLK_RSHIFT; | 108 keymap[SCANCODE_RIGHTSHIFT] = SDLK_RSHIFT; |
109 keymap[SCANCODE_LEFTALT] = SDLK_LALT; | 109 keymap[SCANCODE_LEFTALT] = SDLK_LALT; |
110 keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK; | 110 keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK; |
111 | 111 |
112 AtariXbios_InstallMouseVector(); | 112 SDL_AtariXbios_InstallVectors(ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS); |
113 } | 113 } |
114 | 114 |
115 void AtariGemdos_PumpEvents(_THIS) | 115 void AtariGemdos_PumpEvents(_THIS) |
116 { | 116 { |
117 int i; | 117 int i; |
145 /* Key unpressed ? */ | 145 /* Key unpressed ? */ |
146 if (gemdos_previouskeyboard[i] && !gemdos_currentkeyboard[i]) | 146 if (gemdos_previouskeyboard[i] && !gemdos_currentkeyboard[i]) |
147 SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, gemdos_currentascii[i], &keysym)); | 147 SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, gemdos_currentascii[i], &keysym)); |
148 } | 148 } |
149 | 149 |
150 AtariXbios_PostMouseEvents(this); | 150 SDL_AtariXbios_PostMouseEvents(this); |
151 | 151 |
152 /* Will be previous table */ | 152 /* Will be previous table */ |
153 memcpy(gemdos_previouskeyboard, gemdos_currentkeyboard, ATARIBIOS_MAXKEYS); | 153 memcpy(gemdos_previouskeyboard, gemdos_currentkeyboard, ATARIBIOS_MAXKEYS); |
154 } | 154 } |
155 | 155 |
186 return(keysym); | 186 return(keysym); |
187 } | 187 } |
188 | 188 |
189 void AtariGemdos_ShutdownEvents(void) | 189 void AtariGemdos_ShutdownEvents(void) |
190 { | 190 { |
191 AtariXbios_RestoreMouseVector(); | 191 SDL_AtariXbios_RestoreVectors(); |
192 } | 192 } |