mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Call video_driver_cb_has_focus directly
This commit is contained in:
parent
bd424da015
commit
6fea8f14c5
@ -123,7 +123,7 @@ typedef struct video_pixel_scaler
|
||||
|
||||
static void (*video_driver_cb_shader_use)(void *data, void *shader_data, unsigned index, bool set_active);
|
||||
static bool (*video_driver_cb_shader_set_mvp)(void *data, void *shader_data, const math_matrix_4x4 *mat);
|
||||
static bool (*video_driver_cb_has_focus)(void);
|
||||
bool (*video_driver_cb_has_focus)(void);
|
||||
|
||||
/* Opaque handles to currently running window.
|
||||
* Used by e.g. input drivers which bind to a window.
|
||||
|
@ -776,8 +776,6 @@ struct aspect_ratio_elem
|
||||
|
||||
extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END];
|
||||
|
||||
bool video_driver_is_focused(void);
|
||||
|
||||
bool video_driver_has_windowed(void);
|
||||
|
||||
bool video_driver_cached_frame_has_valid_framebuffer(void);
|
||||
@ -1236,6 +1234,8 @@ bool video_shader_driver_compile_program(struct shader_program_info *program_inf
|
||||
|
||||
bool video_shader_driver_wrap_type(video_shader_ctx_wrap_t *wrap);
|
||||
|
||||
extern bool (*video_driver_cb_has_focus)(void);
|
||||
|
||||
extern shader_backend_t *current_shader;
|
||||
extern void *shader_data;
|
||||
|
||||
|
@ -310,7 +310,7 @@ static void x_input_poll_mouse(x11_input_t *x11)
|
||||
x11->mouse_r = mask & Button3Mask;
|
||||
|
||||
/* Somewhat hacky, but seem to do the job. */
|
||||
if (x11->grab_mouse && video_driver_is_focused())
|
||||
if (x11->grab_mouse && video_driver_cb_has_focus())
|
||||
{
|
||||
int mid_w, mid_h;
|
||||
struct video_viewport vp;
|
||||
@ -345,7 +345,7 @@ static void x_input_poll(void *data)
|
||||
{
|
||||
x11_input_t *x11 = (x11_input_t*)data;
|
||||
|
||||
if (video_driver_is_focused())
|
||||
if (video_driver_cb_has_focus())
|
||||
XQueryKeymap(x11->display, x11->state);
|
||||
else
|
||||
memset(x11->state, 0, sizeof(x11->state));
|
||||
|
Loading…
x
Reference in New Issue
Block a user