mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +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;
|
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)
|
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;
|
return true;
|
||||||
if (sdl->joysticks[port_num] == NULL)
|
if (sdl->joysticks[port_num] == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
@ -27,6 +27,7 @@ typedef struct sdl_input
|
|||||||
unsigned num_buttons[MAX_PLAYERS];
|
unsigned num_buttons[MAX_PLAYERS];
|
||||||
unsigned num_hats[MAX_PLAYERS];
|
unsigned num_hats[MAX_PLAYERS];
|
||||||
unsigned num_joysticks;
|
unsigned num_joysticks;
|
||||||
|
bool use_keyboard;
|
||||||
|
|
||||||
// A video driver could pre-init with the SDL driver and have it handle resizing events...
|
// A video driver could pre-init with the SDL driver and have it handle resizing events...
|
||||||
bool *quitting;
|
bool *quitting;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user