From 20b8d592e196ffa983a9dcbd856e2da07a40d930 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 8 Oct 2015 08:19:38 +0200 Subject: [PATCH] Create RARCH_DEVICE_MOUSE_SCREEN --- driver.h | 4 ++++ input/drivers/x11_input.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/driver.h b/driver.h index 83e4d3f185..fcb6749610 100644 --- a/driver.h +++ b/driver.h @@ -62,6 +62,10 @@ extern "C" { #define AUDIO_MAX_RATIO 16 +/* Specialized _MOUSE that targets the full screen regardless of viewport. + */ +#define RARCH_DEVICE_MOUSE_SCREEN (RETRO_DEVICE_MOUSE | 0x10000) + /* Specialized _POINTER that targets the full screen regardless of viewport. * Should not be used by a libretro implementation as coordinates returned * make no sense. diff --git a/input/drivers/x11_input.c b/input/drivers/x11_input.c index c098246f66..79fa4cc740 100644 --- a/input/drivers/x11_input.c +++ b/input/drivers/x11_input.c @@ -307,8 +307,8 @@ static int16_t x_mouse_state(x11_input_t *x11, unsigned id) static int16_t x_pointer_state(x11_input_t *x11, unsigned idx, unsigned id, bool screen) { - int16_t res_x = 0, res_y = 0, res_screen_x = 0, res_screen_y = 0; bool valid, inside; + int16_t res_x = 0, res_y = 0, res_screen_x = 0, res_screen_y = 0; if (idx != 0) return 0;