mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 21:40:02 +00:00
Create win32_show_cursor
This commit is contained in:
parent
4f43e4b363
commit
b46c9cea87
@ -216,3 +216,13 @@ bool win32_get_metrics(void *data,
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void win32_show_cursor(bool state)
|
||||
{
|
||||
#ifdef HAVE_WINDOW
|
||||
if (state)
|
||||
while (ShowCursor(TRUE) < 0);
|
||||
else
|
||||
while (ShowCursor(FALSE) >= 0);
|
||||
#endif
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ LRESULT win32_menu_loop(HWND handle, WPARAM wparam);
|
||||
bool win32_get_metrics(void *data,
|
||||
enum display_metric_types type, float *value);
|
||||
|
||||
void win32_show_cursor(bool state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -156,12 +156,7 @@ static void gfx_ctx_d3d_show_mouse(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
#ifdef HAVE_WINDOW
|
||||
if (state)
|
||||
while (ShowCursor(TRUE) < 0);
|
||||
else
|
||||
while (ShowCursor(FALSE) >= 0);
|
||||
#endif
|
||||
win32_show_cursor(state);
|
||||
}
|
||||
|
||||
void d3d_make_d3dpp(void *data,
|
||||
|
@ -440,14 +440,6 @@ static bool set_fullscreen(unsigned width, unsigned height, char *dev_name)
|
||||
return ChangeDisplaySettingsEx(dev_name, &devmode, NULL, CDS_FULLSCREEN, NULL) == DISP_CHANGE_SUCCESSFUL;
|
||||
}
|
||||
|
||||
static void show_cursor(bool show)
|
||||
{
|
||||
if (show)
|
||||
while (ShowCursor(TRUE) < 0);
|
||||
else
|
||||
while (ShowCursor(FALSE) >= 0);
|
||||
}
|
||||
|
||||
static void monitor_info(MONITORINFOEX *mon, HMONITOR *hm_to_use)
|
||||
{
|
||||
unsigned fs_monitor;
|
||||
@ -544,7 +536,7 @@ static bool gfx_ctx_wgl_set_video_mode(void *data,
|
||||
SetFocus(g_hwnd);
|
||||
}
|
||||
|
||||
show_cursor(!fullscreen);
|
||||
win32_show_cursor(!fullscreen);
|
||||
|
||||
/* Wait until GL context is created (or failed to do so ...) */
|
||||
while (!g_inited && !g_quit && GetMessage(&msg, g_hwnd, 0, 0))
|
||||
@ -685,7 +677,7 @@ static bool gfx_ctx_wgl_bind_api(void *data,
|
||||
static void gfx_ctx_wgl_show_mouse(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
show_cursor(state);
|
||||
win32_show_cursor(state);
|
||||
}
|
||||
|
||||
static void gfx_ctx_wgl_bind_hw_render(void *data, bool enable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user