Wii: Fix build. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4808 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2014-12-09 23:56:54 +00:00
parent c956f350b7
commit a1c0d58069
5 changed files with 25 additions and 18 deletions

View file

@ -92,8 +92,8 @@ extern char inputdevices;
#define KEYFIFOSIZ 64
extern char keystatus[KEYSTATUSSIZ], keyfifo[KEYFIFOSIZ], keyasciififo[KEYFIFOSIZ];
extern uint8_t keyasciififoplc, keyasciififoend, keyfifoplc, keyfifoend;
extern char scantoasc[128], remap[KEYSTATUSSIZ], key_names[NUMKEYS][24];
extern int32_t remapinit;
extern char scantoasc[128], keyremap[KEYSTATUSSIZ], key_names[NUMKEYS][24];
extern int32_t keyremapinit;
extern int32_t defaultres[][2];

View file

@ -12,8 +12,8 @@
char inputdevices=0;
char keystatus[KEYSTATUSSIZ], keyfifo[KEYFIFOSIZ], keyasciififo[KEYFIFOSIZ];
uint8_t keyfifoplc, keyfifoend, keyasciififoplc, keyasciififoend;
char remap[KEYSTATUSSIZ];
int32_t remapinit=0;
char keyremap[KEYSTATUSSIZ];
int32_t keyremapinit=0;
char key_names[NUMKEYS][24];
int32_t mousex=0,mousey=0,mouseb=0,mouseabsx=0,mouseabsy=0;
uint8_t moustat = 0, mousegrab = 0, mouseinwindow = 1, AppMouseGrab = 1;
@ -56,16 +56,16 @@ int32_t defaultres[][2] =
int32_t GetKey(int32_t key)
{
return keystatus[remap[key]];
return keystatus[keyremap[key]];
}
void SetKey(int32_t key, int32_t state)
{
keystatus[remap[key]] = state;
keystatus[keyremap[key]] = state;
if (state)
{
keyfifo[keyfifoend] = remap[key];
keyfifo[keyfifoend] = keyremap[key];
keyfifo[(keyfifoend+1)&(KEYFIFOSIZ-1)] = state;
keyfifoend = ((keyfifoend+2)&(KEYFIFOSIZ-1));
}

View file

@ -230,9 +230,9 @@ int32_t loadsetup(const char *fn)
if (readconfig(fp, "osdtryscript", val, VL) > 0) m32_osd_tryscript = !!atoi_safe(val);
for (i=0; i<256; i++)
remap[i]=i;
keyremap[i]=i;
remapinit=1;
keyremapinit=1;
if (readconfig(fp, "remap", val, VL) > 0)
{
char *p=val; int32_t v1,v2;
@ -241,7 +241,7 @@ int32_t loadsetup(const char *fn)
if (!sscanf(p,"%x",&v1))break;
if ((p=strchr(p,'-'))==0)break; p++;
if (!sscanf(p,"%x",&v2))break;
remap[v1]=v2;
keyremap[v1]=v2;
initprintf("Remap %X key to %X\n",v1,v2);
if ((p=strchr(p,','))==0)break; p++;
}
@ -607,9 +607,9 @@ int32_t writesetup(const char *fn)
);
for (i=0; i<256; i++)
if (remap[i]!=i)
if (keyremap[i]!=i)
{
Bfprintf(fp,first?"%02X-%02X":",%02X-%02X",i,remap[i]);
Bfprintf(fp,first?"%02X-%02X":",%02X-%02X",i,keyremap[i]);
first=0;
}
Bfprintf(fp,"\n\n");

View file

@ -283,9 +283,16 @@ void wm_setapptitle(const char *name)
# include <ogc/lwp_watchdog.h>
#include "gctypes.h" // for bool
#ifdef __cplusplus
extern "C" {
#endif
extern void L2Enhance();
extern void CON_EnableGecko(int channel,int safe);
extern bool fatInit(uint32_t cacheSize, bool setAsDefaultDevice);
#ifdef __cplusplus
}
#endif
#endif
static void attach_debugger_here(void) {}
@ -641,9 +648,9 @@ int32_t initinput(void)
putenv("SDL_HAS3BUTTONMOUSE=1");
#endif
if (!remapinit)
for (i = 0; i < 256; i++) remap[i] = i;
remapinit = 1;
if (!keyremapinit)
for (i = 0; i < 256; i++) keyremap[i] = i;
keyremapinit = 1;
inputdevices = 1 | 2; // keyboard (1) and mouse (2)
mousegrab = 0;

View file

@ -755,11 +755,11 @@ int32_t initinput(void)
moustat=0;
memset(keystatus, 0, sizeof(keystatus));
if (!remapinit)
if (!keyremapinit)
for (i=0; i<256; i++)
remap[i]=i;
keyremap[i]=i;
remapinit=1;
keyremapinit=1;
keyfifoplc = keyfifoend = 0;
keyasciififoplc = keyasciififoend = 0;