summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Mandin <patmandin@gmail.com>2006-09-20 21:22:08 +0000
committerPatrice Mandin <patmandin@gmail.com>2006-09-20 21:22:08 +0000
commit6943d70cd7e7adb84f2685e8949e3bc063dc6447 (patch)
treec425af6bd09fcca44e37bace1b423c466e3046c4
parent8aa9067950ac2e419586cf0da1281b8796923ab9 (diff)
downloadsdl-6943d70cd7e7adb84f2685e8949e3bc063dc6447.tar.gz
Started work to update for 1.3 api
-rw-r--r--src/video/ataricommon/SDL_atarievents.c48
-rw-r--r--src/video/ataricommon/SDL_atarievents_c.h8
-rw-r--r--src/video/ataricommon/SDL_biosevents_c.h3
-rw-r--r--src/video/ataricommon/SDL_gemdosevents_c.h3
-rw-r--r--src/video/ataricommon/SDL_ikbdevents_c.h3
5 files changed, 21 insertions, 44 deletions
diff --git a/src/video/ataricommon/SDL_atarievents.c b/src/video/ataricommon/SDL_atarievents.c
index 30bfc7515..55eedb250 100644
--- a/src/video/ataricommon/SDL_atarievents.c
+++ b/src/video/ataricommon/SDL_atarievents.c
@@ -60,10 +60,10 @@ enum
static SDLKey keymap[ATARIBIOS_MAXKEYS];
static unsigned char *keytab_normal;
-void (*Atari_ShutdownEvents) (void);
+void (*SDL_Atari_ShutdownEvents) (void);
static void
-Atari_InitializeEvents(_THIS)
+SDL_Atari_InitializeEvents(_THIS)
{
const char *envr;
unsigned long cookie_mch;
@@ -81,14 +81,12 @@ Atari_InitializeEvents(_THIS)
case MCH_TT:
case MCH_F30:
case MCH_ARANYM:
- this->InitOSKeymap = AtariIkbd_InitOSKeymap;
- this->PumpEvents = AtariIkbd_PumpEvents;
- Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
+ _this->PumpEvents = AtariIkbd_PumpEvents;
+ SDL_Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
break;
default:
- this->InitOSKeymap = AtariGemdos_InitOSKeymap;
- this->PumpEvents = AtariGemdos_PumpEvents;
- Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
+ _this->PumpEvents = AtariGemdos_PumpEvents;
+ SDL_Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
break;
}
@@ -99,42 +97,34 @@ Atari_InitializeEvents(_THIS)
}
if (SDL_strcmp(envr, "ikbd") == 0) {
- this->InitOSKeymap = AtariIkbd_InitOSKeymap;
- this->PumpEvents = AtariIkbd_PumpEvents;
- Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
+ _this->PumpEvents = AtariIkbd_PumpEvents;
+ SDL_Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
}
if (SDL_strcmp(envr, "gemdos") == 0) {
- this->InitOSKeymap = AtariGemdos_InitOSKeymap;
- this->PumpEvents = AtariGemdos_PumpEvents;
- Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
+ _this->PumpEvents = AtariGemdos_PumpEvents;
+ SDL_Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
}
if (SDL_strcmp(envr, "bios") == 0) {
- this->InitOSKeymap = AtariBios_InitOSKeymap;
- this->PumpEvents = AtariBios_PumpEvents;
- Atari_ShutdownEvents = AtariBios_ShutdownEvents;
+ _this->PumpEvents = AtariBios_PumpEvents;
+ SDL_Atari_ShutdownEvents = AtariBios_ShutdownEvents;
}
-}
-
-void
-Atari_InitOSKeymap(_THIS)
-{
- Atari_InitializeEvents(this);
- SDL_Atari_InitInternalKeymap(this);
-
- /* Call choosen routine */
- this->InitOSKeymap(this);
+ SDL_Atari_InitInternalKeymap(_this);
}
void
Atari_PumpEvents(_THIS)
{
- Atari_InitializeEvents(this);
+ static int first_time = 1;
+ if (first_time) {
+ Atari_InitializeEvents(_this);
+ first_time = 0;
+ }
/* Call choosen routine */
- this->PumpEvents(this);
+ _this->PumpEvents(_this);
}
void
diff --git a/src/video/ataricommon/SDL_atarievents_c.h b/src/video/ataricommon/SDL_atarievents_c.h
index 497d89e21..cb378f39c 100644
--- a/src/video/ataricommon/SDL_atarievents_c.h
+++ b/src/video/ataricommon/SDL_atarievents_c.h
@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h"
-/* Hidden "this" pointer for the video functions */
-#define _THIS SDL_VideoDevice *this
-
#define ATARIBIOS_MAXKEYS 128
/* Special keys state */
@@ -50,10 +47,9 @@ enum {
};
#endif
-extern void (*Atari_ShutdownEvents) (void);
+extern void (*SDL_Atari_ShutdownEvents) (void);
-extern void Atari_InitOSKeymap(_THIS);
-extern void Atari_PumpEvents(_THIS);
+extern void SDL_Atari_PumpEvents(_THIS);
extern void SDL_Atari_InitInternalKeymap(_THIS);
diff --git a/src/video/ataricommon/SDL_biosevents_c.h b/src/video/ataricommon/SDL_biosevents_c.h
index c2eb7069f..8c2947dfc 100644
--- a/src/video/ataricommon/SDL_biosevents_c.h
+++ b/src/video/ataricommon/SDL_biosevents_c.h
@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h"
-/* Hidden "this" pointer for the video functions */
-#define _THIS SDL_VideoDevice *this
-
extern void AtariBios_InitOSKeymap(_THIS);
extern void AtariBios_PumpEvents(_THIS);
extern void AtariBios_ShutdownEvents(void);
diff --git a/src/video/ataricommon/SDL_gemdosevents_c.h b/src/video/ataricommon/SDL_gemdosevents_c.h
index 52e90fbd1..618a26b8e 100644
--- a/src/video/ataricommon/SDL_gemdosevents_c.h
+++ b/src/video/ataricommon/SDL_gemdosevents_c.h
@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h"
-/* Hidden "this" pointer for the video functions */
-#define _THIS SDL_VideoDevice *this
-
extern void AtariGemdos_InitOSKeymap(_THIS);
extern void AtariGemdos_PumpEvents(_THIS);
extern void AtariGemdos_ShutdownEvents(void);
diff --git a/src/video/ataricommon/SDL_ikbdevents_c.h b/src/video/ataricommon/SDL_ikbdevents_c.h
index 6570c33c0..aeb2bd984 100644
--- a/src/video/ataricommon/SDL_ikbdevents_c.h
+++ b/src/video/ataricommon/SDL_ikbdevents_c.h
@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h"
-/* Hidden "this" pointer for the video functions */
-#define _THIS SDL_VideoDevice *this
-
extern void AtariIkbd_InitOSKeymap(_THIS);
extern void AtariIkbd_PumpEvents(_THIS);
extern void AtariIkbd_ShutdownEvents(void);