mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 06:11:51 +00:00
Getting ready for an eventual XVideo driver.
This commit is contained in:
parent
394de09907
commit
bb79dbaa98
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user