mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Add software cursor to Linux overlay too
This commit is contained in:
parent
1af7902aae
commit
695954e13a
1 changed files with 11 additions and 2 deletions
|
@ -166,6 +166,17 @@ void Steam_Overlay::ShowOverlay(bool state)
|
||||||
if (!Ready() || show_overlay == state)
|
if (!Ready() || show_overlay == state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ImGuiIO &io = ImGui::GetIO();
|
||||||
|
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
io.MouseDrawCursor = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
io.MouseDrawCursor = false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
static RECT old_clip;
|
static RECT old_clip;
|
||||||
|
|
||||||
|
@ -197,12 +208,10 @@ void Steam_Overlay::ShowOverlay(bool state)
|
||||||
clipRect.bottom -= borderWidth;
|
clipRect.bottom -= borderWidth;
|
||||||
|
|
||||||
ClipCursor(&clipRect);
|
ClipCursor(&clipRect);
|
||||||
ImGui::GetIO().MouseDrawCursor = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClipCursor(&old_clip);
|
ClipCursor(&old_clip);
|
||||||
ImGui::GetIO().MouseDrawCursor = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue