Commit 90e84f05 authored by Patrice Mandin's avatar Patrice Mandin

Started work to update for 1.3 api

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402096
parent 4c0cd25c
...@@ -60,10 +60,10 @@ enum ...@@ -60,10 +60,10 @@ enum
static SDLKey keymap[ATARIBIOS_MAXKEYS]; static SDLKey keymap[ATARIBIOS_MAXKEYS];
static unsigned char *keytab_normal; static unsigned char *keytab_normal;
void (*Atari_ShutdownEvents) (void); void (*SDL_Atari_ShutdownEvents) (void);
static void static void
Atari_InitializeEvents(_THIS) SDL_Atari_InitializeEvents(_THIS)
{ {
const char *envr; const char *envr;
unsigned long cookie_mch; unsigned long cookie_mch;
...@@ -81,14 +81,12 @@ Atari_InitializeEvents(_THIS) ...@@ -81,14 +81,12 @@ Atari_InitializeEvents(_THIS)
case MCH_TT: case MCH_TT:
case MCH_F30: case MCH_F30:
case MCH_ARANYM: case MCH_ARANYM:
this->InitOSKeymap = AtariIkbd_InitOSKeymap; _this->PumpEvents = AtariIkbd_PumpEvents;
this->PumpEvents = AtariIkbd_PumpEvents; SDL_Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
break; break;
default: default:
this->InitOSKeymap = AtariGemdos_InitOSKeymap; _this->PumpEvents = AtariGemdos_PumpEvents;
this->PumpEvents = AtariGemdos_PumpEvents; SDL_Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
break; break;
} }
...@@ -99,42 +97,34 @@ Atari_InitializeEvents(_THIS) ...@@ -99,42 +97,34 @@ Atari_InitializeEvents(_THIS)
} }
if (SDL_strcmp(envr, "ikbd") == 0) { if (SDL_strcmp(envr, "ikbd") == 0) {
this->InitOSKeymap = AtariIkbd_InitOSKeymap; _this->PumpEvents = AtariIkbd_PumpEvents;
this->PumpEvents = AtariIkbd_PumpEvents; SDL_Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
Atari_ShutdownEvents = AtariIkbd_ShutdownEvents;
} }
if (SDL_strcmp(envr, "gemdos") == 0) { if (SDL_strcmp(envr, "gemdos") == 0) {
this->InitOSKeymap = AtariGemdos_InitOSKeymap; _this->PumpEvents = AtariGemdos_PumpEvents;
this->PumpEvents = AtariGemdos_PumpEvents; SDL_Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
Atari_ShutdownEvents = AtariGemdos_ShutdownEvents;
} }
if (SDL_strcmp(envr, "bios") == 0) { if (SDL_strcmp(envr, "bios") == 0) {
this->InitOSKeymap = AtariBios_InitOSKeymap; _this->PumpEvents = AtariBios_PumpEvents;
this->PumpEvents = AtariBios_PumpEvents; SDL_Atari_ShutdownEvents = AtariBios_ShutdownEvents;
Atari_ShutdownEvents = AtariBios_ShutdownEvents;
} }
}
void
Atari_InitOSKeymap(_THIS)
{
Atari_InitializeEvents(this);
SDL_Atari_InitInternalKeymap(this); SDL_Atari_InitInternalKeymap(_this);
/* Call choosen routine */
this->InitOSKeymap(this);
} }
void void
Atari_PumpEvents(_THIS) Atari_PumpEvents(_THIS)
{ {
Atari_InitializeEvents(this); static int first_time = 1;
if (first_time) {
Atari_InitializeEvents(_this);
first_time = 0;
}
/* Call choosen routine */ /* Call choosen routine */
this->PumpEvents(this); _this->PumpEvents(_this);
} }
void void
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h" #include "../SDL_sysvideo.h"
/* Hidden "this" pointer for the video functions */
#define _THIS SDL_VideoDevice *this
#define ATARIBIOS_MAXKEYS 128 #define ATARIBIOS_MAXKEYS 128
/* Special keys state */ /* Special keys state */
...@@ -50,10 +47,9 @@ enum { ...@@ -50,10 +47,9 @@ enum {
}; };
#endif #endif
extern void (*Atari_ShutdownEvents) (void); extern void (*SDL_Atari_ShutdownEvents) (void);
extern void Atari_InitOSKeymap(_THIS); extern void SDL_Atari_PumpEvents(_THIS);
extern void Atari_PumpEvents(_THIS);
extern void SDL_Atari_InitInternalKeymap(_THIS); extern void SDL_Atari_InitInternalKeymap(_THIS);
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h" #include "../SDL_sysvideo.h"
/* Hidden "this" pointer for the video functions */
#define _THIS SDL_VideoDevice *this
extern void AtariBios_InitOSKeymap(_THIS); extern void AtariBios_InitOSKeymap(_THIS);
extern void AtariBios_PumpEvents(_THIS); extern void AtariBios_PumpEvents(_THIS);
extern void AtariBios_ShutdownEvents(void); extern void AtariBios_ShutdownEvents(void);
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h" #include "../SDL_sysvideo.h"
/* Hidden "this" pointer for the video functions */
#define _THIS SDL_VideoDevice *this
extern void AtariGemdos_InitOSKeymap(_THIS); extern void AtariGemdos_InitOSKeymap(_THIS);
extern void AtariGemdos_PumpEvents(_THIS); extern void AtariGemdos_PumpEvents(_THIS);
extern void AtariGemdos_ShutdownEvents(void); extern void AtariGemdos_ShutdownEvents(void);
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include "../SDL_sysvideo.h" #include "../SDL_sysvideo.h"
/* Hidden "this" pointer for the video functions */
#define _THIS SDL_VideoDevice *this
extern void AtariIkbd_InitOSKeymap(_THIS); extern void AtariIkbd_InitOSKeymap(_THIS);
extern void AtariIkbd_PumpEvents(_THIS); extern void AtariIkbd_PumpEvents(_THIS);
extern void AtariIkbd_ShutdownEvents(void); extern void AtariIkbd_ShutdownEvents(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment