Getting ready for an eventual XVideo driver.

This commit is contained in:
Themaister 2011-03-13 00:44:49 +01:00
parent 394de09907
commit bb79dbaa98
2 changed files with 4 additions and 1 deletions

View File

@ -61,6 +61,8 @@ static void* sdl_input_init(void)
}
}
sdl->use_keyboard = true;
return sdl;
}
@ -141,7 +143,7 @@ static bool sdl_axis_pressed(sdl_input_t *sdl, int port_num, uint32_t joyaxis)
static bool sdl_is_pressed(sdl_input_t *sdl, int port_num, const struct snes_keybind *key)
{
if (sdl_key_pressed(key->key))
if (sdl->use_keyboard && sdl_key_pressed(key->key))
return true;
if (sdl->joysticks[port_num] == NULL)
return false;

View File

@ -27,6 +27,7 @@ typedef struct sdl_input
unsigned num_buttons[MAX_PLAYERS];
unsigned num_hats[MAX_PLAYERS];
unsigned num_joysticks;
bool use_keyboard;
// A video driver could pre-init with the SDL driver and have it handle resizing events...
bool *quitting;