Skip to content

Commit

Permalink
Don't show the hardware cursor ever in game, unless running -dedicate…
Browse files Browse the repository at this point in the history
…d. I may eventually make the window use the hardware cursor with the software bitmap.. maybe. Fixes #8
  • Loading branch information
InsanityBringer committed May 9, 2024
1 parent dd1dfb8 commit 6cfa8c0
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions ddio_win/winmouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,14 @@ void DDIOShowCursor(BOOL show)
{
if (show)
{
if (DDIO_mouse_state.cursor_count == -1)
{
ShowCursor(TRUE);
}
//if (DDIO_mouse_state.cursor_count == -1)
// ShowCursor(TRUE);
DDIO_mouse_state.cursor_count = 0;
}
else
{
if (DDIO_mouse_state.cursor_count == 0)
{
ShowCursor(FALSE);
}
//if (DDIO_mouse_state.cursor_count == 0)
// ShowCursor(FALSE);
DDIO_mouse_state.cursor_count = -1;
}
}
Expand Down Expand Up @@ -584,9 +580,12 @@ bool ddio_MouseInit()
// standard initialization
DDIO_mouse_state.emulated = (DDIO_mouse_state.lpdimse) ? false : true;
DDIO_mouse_state.cursor_count = ShowCursor(TRUE); // get initial count
while (DDIO_mouse_state.cursor_count >= 0) // hide cursor until truly hidden.

//Never hide the cursor when the game is in dedicated server mode.
if (!(DInputData.app->flags() & OEAPP_CONSOLE))
{
DDIO_mouse_state.cursor_count = ShowCursor(FALSE);
while (DDIO_mouse_state.cursor_count >= 0) // hide cursor until truly hidden.
DDIO_mouse_state.cursor_count = ShowCursor(FALSE);
}

ddio_MouseMode(MOUSE_STANDARD_MODE);
Expand Down

0 comments on commit 6cfa8c0

Please sign in to comment.