mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 12:40:07 +00:00
Create win32_has_focus
This commit is contained in:
parent
b5929e800f
commit
3d6f6869f0
@ -670,3 +670,18 @@ bool win32_set_video_mode(void *data,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef _XBOX
|
||||
static HANDLE GetFocus(void)
|
||||
{
|
||||
return g_hwnd;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool win32_has_focus(void *data)
|
||||
{
|
||||
if (!g_inited)
|
||||
return false;
|
||||
|
||||
return GetFocus() == g_hwnd;
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ bool win32_get_metrics(void *data,
|
||||
|
||||
void win32_show_cursor(bool state);
|
||||
|
||||
bool win32_has_focus(void *data);
|
||||
|
||||
void win32_check_window(bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height);
|
||||
|
||||
|
@ -124,21 +124,9 @@ static void gfx_ctx_d3d_check_window(void *data, bool *quit,
|
||||
win32_check_window(quit, resize, width, height);
|
||||
}
|
||||
|
||||
#ifdef _XBOX
|
||||
static HANDLE GetFocus(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
d3d_video_t *d3d = (d3d_video_t*)driver->video_data;
|
||||
return d3d->hWnd;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool gfx_ctx_d3d_has_focus(void *data)
|
||||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
if (!d3d)
|
||||
return false;
|
||||
return GetFocus() == g_hwnd;
|
||||
return win32_has_focus();
|
||||
}
|
||||
|
||||
static bool gfx_ctx_d3d_suppress_screensaver(void *data, bool enable)
|
||||
|
@ -397,12 +397,7 @@ static void gfx_ctx_wgl_input_driver(void *data,
|
||||
|
||||
static bool gfx_ctx_wgl_has_focus(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
if (!g_inited)
|
||||
return false;
|
||||
|
||||
return GetFocus() == g_hwnd;
|
||||
return win32_has_focus();
|
||||
}
|
||||
|
||||
static bool gfx_ctx_wgl_suppress_screensaver(void *data, bool enable)
|
||||
|
@ -53,7 +53,7 @@ typedef struct video_info
|
||||
bool smooth;
|
||||
/* Maximum input size: RARCH_SCALE_BASE * input_scale */
|
||||
unsigned input_scale;
|
||||
/* Use 32bit RGBA rather than native XBGR1555. */
|
||||
/* Use 32bit RGBA rather than native RGB565/XBGR1555. */
|
||||
bool rgb32;
|
||||
} video_info_t;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user