comparison src/video/ataricommon/SDL_atarievents.c @ 1668:4da1ee79c9af SDL-1.3

more tweaking indent options
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 04:04:35 +0000
parents 782fd950bd46
children
comparison
equal deleted inserted replaced
1667:1fddae038bc8 1668:4da1ee79c9af
50 }; 50 };
51 51
52 void (*Atari_ShutdownEvents) (void); 52 void (*Atari_ShutdownEvents) (void);
53 53
54 static void 54 static void
55 Atari_InitializeEvents (_THIS) 55 Atari_InitializeEvents(_THIS)
56 { 56 {
57 const char *envr; 57 const char *envr;
58 unsigned long cookie_mch; 58 unsigned long cookie_mch;
59 59
60 /* Test if we are on an Atari machine or not */ 60 /* Test if we are on an Atari machine or not */
61 if (Getcookie (C__MCH, &cookie_mch) == C_NOTFOUND) { 61 if (Getcookie(C__MCH, &cookie_mch) == C_NOTFOUND) {
62 cookie_mch = 0; 62 cookie_mch = 0;
63 } 63 }
64 cookie_mch >>= 16; 64 cookie_mch >>= 16;
65 65
66 /* Default is Ikbd, the faster except for clones */ 66 /* Default is Ikbd, the faster except for clones */
79 this->PumpEvents = AtariGemdos_PumpEvents; 79 this->PumpEvents = AtariGemdos_PumpEvents;
80 Atari_ShutdownEvents = AtariGemdos_ShutdownEvents; 80 Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
81 break; 81 break;
82 } 82 }
83 83
84 envr = SDL_getenv ("SDL_ATARI_EVENTSDRIVER"); 84 envr = SDL_getenv("SDL_ATARI_EVENTSDRIVER");
85 85
86 if (!envr) { 86 if (!envr) {
87 return; 87 return;
88 } 88 }
89 89
90 if (SDL_strcmp (envr, "ikbd") == 0) { 90 if (SDL_strcmp(envr, "ikbd") == 0) {
91 this->InitOSKeymap = AtariIkbd_InitOSKeymap; 91 this->InitOSKeymap = AtariIkbd_InitOSKeymap;
92 this->PumpEvents = AtariIkbd_PumpEvents; 92 this->PumpEvents = AtariIkbd_PumpEvents;
93 Atari_ShutdownEvents = AtariIkbd_ShutdownEvents; 93 Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
94 } 94 }
95 95
96 if (SDL_strcmp (envr, "gemdos") == 0) { 96 if (SDL_strcmp(envr, "gemdos") == 0) {
97 this->InitOSKeymap = AtariGemdos_InitOSKeymap; 97 this->InitOSKeymap = AtariGemdos_InitOSKeymap;
98 this->PumpEvents = AtariGemdos_PumpEvents; 98 this->PumpEvents = AtariGemdos_PumpEvents;
99 Atari_ShutdownEvents = AtariGemdos_ShutdownEvents; 99 Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
100 } 100 }
101 101
102 if (SDL_strcmp (envr, "bios") == 0) { 102 if (SDL_strcmp(envr, "bios") == 0) {
103 this->InitOSKeymap = AtariBios_InitOSKeymap; 103 this->InitOSKeymap = AtariBios_InitOSKeymap;
104 this->PumpEvents = AtariBios_PumpEvents; 104 this->PumpEvents = AtariBios_PumpEvents;
105 Atari_ShutdownEvents = AtariBios_ShutdownEvents; 105 Atari_ShutdownEvents = AtariBios_ShutdownEvents;
106 } 106 }
107 } 107 }
108 108
109 void 109 void
110 Atari_InitOSKeymap (_THIS) 110 Atari_InitOSKeymap(_THIS)
111 { 111 {
112 Atari_InitializeEvents (this); 112 Atari_InitializeEvents(this);
113 113
114 /* Call choosen routine */ 114 /* Call choosen routine */
115 this->InitOSKeymap (this); 115 this->InitOSKeymap(this);
116 } 116 }
117 117
118 void 118 void
119 Atari_PumpEvents (_THIS) 119 Atari_PumpEvents(_THIS)
120 { 120 {
121 Atari_InitializeEvents (this); 121 Atari_InitializeEvents(this);
122 122
123 /* Call choosen routine */ 123 /* Call choosen routine */
124 this->PumpEvents (this); 124 this->PumpEvents(this);
125 } 125 }
126 126
127 /* Atari to Unicode charset translation table */ 127 /* Atari to Unicode charset translation table */
128 128
129 Uint16 SDL_AtariToUnicodeTable[256] = { 129 Uint16 SDL_AtariToUnicodeTable[256] = {