sdl: implemented GetKeyboard() for transformer board

This commit is contained in:
punkrockguy318 2012-10-28 17:42:01 +00:00
parent be47e34b05
commit 90a869daee
2 changed files with 11 additions and 1 deletions

View File

@ -23,7 +23,7 @@
static uint8 *WRAM=NULL; static uint8 *WRAM=NULL;
static uint32 WRAMSIZE; static uint32 WRAMSIZE;
unsigned int *GetKeyboard(void); // FIXME: not so much portable, don't know really how to solve this correctly here... unsigned int *GetKeyboard(void); // FIXME: 10/28 - now implemented in SDL as well. should we rename this to a FCEUI_* function?
static unsigned int *TransformerKeys, oldkeys[256]; static unsigned int *TransformerKeys, oldkeys[256];
static int TransformerCycleCount, TransformerChar = 0; static int TransformerCycleCount, TransformerChar = 0;

View File

@ -420,6 +420,16 @@ void FCEUD_LoadStateFrom ()
FCEUI_LoadState (fname.c_str ()); FCEUI_LoadState (fname.c_str ());
} }
/**
* Hook for transformer board
*/
unsigned int *GetKeyboard(void)
{
int size = 256;
Uint8* keystate = SDL_GetKeyState(&size);
return (unsigned int*)(keystate);
}
/** /**
* Parse keyboard commands and execute accordingly. * Parse keyboard commands and execute accordingly.
*/ */