Skip to content

Commit

Permalink
Fix per #2
Browse files Browse the repository at this point in the history
  • Loading branch information
avaxar committed Sep 17, 2024
1 parent cecea40 commit 91606f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/dsdl2/mouse.d
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Cursor getDefaultCursor() @trusted {
+ Returns: `true` if cursor is visible, otherwise `false`
+/
bool getCursorVisibility() @trusted {
return SDL_ShowCursor(SDL_QUERY) != SDL_ENABLE;
return SDL_ShowCursor(SDL_QUERY) == SDL_ENABLE;
}

/++
Expand All @@ -307,7 +307,7 @@ bool getCursorVisibility() @trusted {
+ Throws: `dsdl2.SDLException` if failed to set cursor visibility
+/
void setCursorVisibility(bool visible) @trusted {
if (SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE) != 0) {
if (SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE) < 0) {
throw new SDLException;
}
}
Expand Down

0 comments on commit 91606f4

Please sign in to comment.