mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 20:38:07 +01:00
revert of "Should fix the cursor until we draw our own cursor."
This commit is contained in:
parent
6ebc946607
commit
344674b889
1 changed files with 2 additions and 15 deletions
|
@ -125,7 +125,6 @@ void Steam_Overlay::ShowOverlay(bool state)
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
static RECT old_clip;
|
static RECT old_clip;
|
||||||
static BOOL show_cursor = FALSE;
|
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
|
@ -155,24 +154,12 @@ void Steam_Overlay::ShowOverlay(bool state)
|
||||||
clipRect.bottom -= borderWidth;
|
clipRect.bottom -= borderWidth;
|
||||||
|
|
||||||
ClipCursor(&clipRect);
|
ClipCursor(&clipRect);
|
||||||
|
ImGui::GetIO().MouseDrawCursor = true;
|
||||||
CURSORINFO cinfo;
|
|
||||||
cinfo.cbSize = sizeof(cinfo);
|
|
||||||
GetCursorInfo(&cinfo);
|
|
||||||
show_cursor = cinfo.flags == CURSOR_SHOWING;
|
|
||||||
|
|
||||||
POINT pos;
|
|
||||||
pos.x = cliRect.right/2;
|
|
||||||
pos.y = cliRect.bottom/2;
|
|
||||||
ClientToScreen(game_hwnd, &pos);
|
|
||||||
SetCursorPos(pos.x, pos.y);
|
|
||||||
while (ShowCursor(TRUE) < 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClipCursor(&old_clip);
|
ClipCursor(&old_clip);
|
||||||
if (!show_cursor)
|
ImGui::GetIO().MouseDrawCursor = false;
|
||||||
while (ShowCursor(FALSE) >= 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue