Update implementations for other input drivers - not all input

drivers support this yet
This commit is contained in:
twinaphex 2018-07-15 14:34:02 +02:00
parent 9a1ac6d77b
commit ea09c29e04
16 changed files with 47 additions and 5 deletions

View File

@ -68,6 +68,9 @@ enum {
/* Use this to enable/disable using the touch screen as mouse */
#define ENABLE_TOUCH_SCREEN_MOUSE 1
/* TODO/FIXME -
* fix game focus toggle */
typedef struct
{
float x;

View File

@ -33,6 +33,9 @@
#include "../drivers_keyboard/keyboard_event_apple.h"
/* TODO/FIXME -
* fix game focus toggle */
/* Forward declarations */
float get_backing_scale_factor(void);

View File

@ -29,6 +29,9 @@
#define MAX_PADS 1
/* TODO/FIXME -
* fix game focus toggle */
typedef struct ctr_input
{
bool blocked;

View File

@ -21,6 +21,9 @@
#include "../input_keymaps.h"
#include "../drivers_keyboard/keyboard_event_dos.h"
/* TODO/FIXME -
* fix game focus toggle */
typedef struct dos_input
{
const input_device_driver_t *joypad;

View File

@ -31,6 +31,9 @@
#define MAX_PADS 4
#endif
/* TODO/FIXME -
* fix game focus toggle */
typedef struct gx_input
{
bool blocked;

View File

@ -32,6 +32,9 @@
#include "../input_keymaps.h"
#include "../input_driver.h"
/* TODO/FIXME -
* fix game focus toggle */
typedef struct linuxraw_input
{
bool blocked;

View File

@ -40,6 +40,9 @@
#define MAX_PADS 7
#endif
/* TODO/FIXME -
* fix game focus toggle */
typedef struct
{
float x;

View File

@ -43,6 +43,9 @@
#include "../input_driver.h"
/* TODO/FIXME -
* fix game focus toggle */
typedef struct psp_input
{
bool blocked;

View File

@ -736,12 +736,14 @@ static bool qnx_is_pressed(qnx_input_t *qnx,
unsigned port, unsigned id)
{
const struct retro_keybind *bind = &binds[id];
int key = bind->key;
if (id >= RARCH_BIND_LIST_END)
return false;
if (!qnx->blocked && qnx_keyboard_pressed(qnx, bind->key))
return true;
if (qnx_keyboard_pressed(qnx, key))
if ((id == RARCH_GAME_FOCUS_TOGGLE) || !qnx->blocked)
return true;
if (binds && binds[id].valid && input_joypad_pressed(qnx->joypad, joypad_info, port, binds, id))
return true;

View File

@ -479,7 +479,7 @@ static bool rwebinput_is_pressed(rwebinput_input_t *rwebinput,
const struct retro_keybind *bind = &binds[id];
int key = bind->key;
if ((bind->key < RETROK_LAST) && rwebinput_key_pressed(rwebinput, key))
if ((key < RETROK_LAST) && rwebinput_key_pressed(rwebinput, key))
if ((id == RARCH_GAME_FOCUS_TOGGLE) || !rwebinput->blocked)
return true;

View File

@ -31,6 +31,9 @@
#include "../../verbosity.h"
#include "../../tasks/tasks_internal.h"
/* TODO/FIXME -
* fix game focus toggle */
typedef struct sdl_input
{
bool blocked;

View File

@ -13,6 +13,9 @@
#define MAX_PADS 10
/* TODO/FIXME -
* fix game focus toggle */
typedef struct switch_input
{
const input_device_driver_t *joypad;

View File

@ -47,6 +47,9 @@
#include "../../verbosity.h"
/* TODO/FIXME -
* fix game focus toggle */
/* Forward declaration */
void flush_wayland_fd(void *data);

View File

@ -131,8 +131,9 @@ static bool x_is_pressed(x11_input_t *x11,
{
const struct retro_keybind *bind = &binds[id];
if ( (bind->key < RETROK_LAST) && x_keyboard_pressed(x11, bind->key) )
return true;
if ((bind->key < RETROK_LAST) && x_keyboard_pressed(x11, bind->key) )
if ((id == RARCH_GAME_FOCUS_TOGGLE) || !x11->blocked)
return true;
if (binds && binds[id].valid)
{

View File

@ -32,6 +32,9 @@
#define MAX_PADS 4
/* TODO/FIXME -
* fix game focus toggle */
typedef struct xdk_input
{
bool blocked;

View File

@ -27,6 +27,9 @@
#define MAX_PADS 4
/* TODO/FIXME -
* fix game focus toggle */
static uint64_t state[MAX_PADS];
static void xenon360_input_poll(void *data)