mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-09 02:48:54 +00:00
win32: only hide cursor if in fullscreen
This commit is contained in:
parent
8bd1ef77ff
commit
13fafd80ab
@ -217,6 +217,14 @@ static bool set_fullscreen(unsigned width, unsigned height)
|
||||
return ChangeDisplaySettings(&devmode, CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL;
|
||||
}
|
||||
|
||||
static void show_cursor(bool show)
|
||||
{
|
||||
if(show)
|
||||
while(ShowCursor(TRUE)<0);
|
||||
else
|
||||
while(ShowCursor(FALSE)>=0);
|
||||
}
|
||||
|
||||
static bool gfx_ctx_set_video_mode(
|
||||
unsigned width, unsigned height,
|
||||
unsigned bits, bool fullscreen)
|
||||
@ -272,13 +280,14 @@ static bool gfx_ctx_set_video_mode(
|
||||
|
||||
if (!fullscreen || windowed_full)
|
||||
{
|
||||
ShowCursor(FALSE);
|
||||
ShowWindow(g_hwnd, SW_RESTORE);
|
||||
UpdateWindow(g_hwnd);
|
||||
SetForegroundWindow(g_hwnd);
|
||||
SetFocus(g_hwnd);
|
||||
}
|
||||
|
||||
show_cursor(!fullscreen);
|
||||
|
||||
// Wait until GL context is created (or failed to do so ...)
|
||||
MSG msg;
|
||||
while (!g_inited && !g_quit && GetMessage(&msg, g_hwnd, 0, 0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user