Mercurial > sdl-ios-xcode
comparison src/video/ataricommon/SDL_biosevents.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 bios_currentkeyboard[ATARIBIOS_MAXKEYS]; | 49 static unsigned char bios_currentkeyboard[ATARIBIOS_MAXKEYS]; |
102 keymap[SCANCODE_LEFTSHIFT] = SDLK_LSHIFT; | 102 keymap[SCANCODE_LEFTSHIFT] = SDLK_LSHIFT; |
103 keymap[SCANCODE_RIGHTSHIFT] = SDLK_RSHIFT; | 103 keymap[SCANCODE_RIGHTSHIFT] = SDLK_RSHIFT; |
104 keymap[SCANCODE_LEFTALT] = SDLK_LALT; | 104 keymap[SCANCODE_LEFTALT] = SDLK_LALT; |
105 keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK; | 105 keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK; |
106 | 106 |
107 AtariXbios_InstallMouseVector(); | 107 SDL_AtariXbios_InstallVectors(ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS); |
108 } | 108 } |
109 | 109 |
110 void AtariBios_PumpEvents(_THIS) | 110 void AtariBios_PumpEvents(_THIS) |
111 { | 111 { |
112 int i; | 112 int i; |
140 /* Key unpressed ? */ | 140 /* Key unpressed ? */ |
141 if (bios_previouskeyboard[i] && !bios_currentkeyboard[i]) | 141 if (bios_previouskeyboard[i] && !bios_currentkeyboard[i]) |
142 SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, bios_currentascii[i], &keysym)); | 142 SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, bios_currentascii[i], &keysym)); |
143 } | 143 } |
144 | 144 |
145 AtariXbios_PostMouseEvents(this); | 145 SDL_AtariXbios_PostMouseEvents(this); |
146 | 146 |
147 /* Will be previous table */ | 147 /* Will be previous table */ |
148 memcpy(bios_previouskeyboard, bios_currentkeyboard, ATARIBIOS_MAXKEYS); | 148 memcpy(bios_previouskeyboard, bios_currentkeyboard, ATARIBIOS_MAXKEYS); |
149 } | 149 } |
150 | 150 |
181 return(keysym); | 181 return(keysym); |
182 } | 182 } |
183 | 183 |
184 void AtariBios_ShutdownEvents(void) | 184 void AtariBios_ShutdownEvents(void) |
185 { | 185 { |
186 AtariXbios_RestoreMouseVector(); | 186 SDL_AtariXbios_RestoreVectors(); |
187 } | 187 } |