mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 23:40:54 +00:00
Update SDL_mouse.c
This commit is contained in:
parent
5699ba799e
commit
e2857fc5a2
2 changed files with 6 additions and 3 deletions
|
@ -2509,9 +2509,10 @@ extern "C" {
|
||||||
* A variable controlling whether the hardware cursor stays visible when
|
* A variable controlling whether the hardware cursor stays visible when
|
||||||
* relative mode is active.
|
* relative mode is active.
|
||||||
*
|
*
|
||||||
* This variable can be set to the following values: "0" - The cursor will be
|
* This variable can be set to the following values:
|
||||||
* hidden while relative mode is active (default) "1" - The cursor will remain
|
*
|
||||||
* visible while relative mode is active
|
* - "0" - The cursor will be hidden while relative mode is active (default)
|
||||||
|
* - "1" - The cursor will remain visible while relative mode is active
|
||||||
*
|
*
|
||||||
* Note that for systems without raw hardware inputs, relative mode is
|
* Note that for systems without raw hardware inputs, relative mode is
|
||||||
* implemented using warping, so the hardware cursor will visibly warp between
|
* implemented using warping, so the hardware cursor will visibly warp between
|
||||||
|
|
|
@ -200,6 +200,8 @@ static void SDLCALL SDL_MouseRelativeCursorVisibleChanged(void *userdata, const
|
||||||
SDL_Mouse *mouse = (SDL_Mouse *)userdata;
|
SDL_Mouse *mouse = (SDL_Mouse *)userdata;
|
||||||
|
|
||||||
mouse->relative_mode_cursor_visible = SDL_GetStringBoolean(hint, false);
|
mouse->relative_mode_cursor_visible = SDL_GetStringBoolean(hint, false);
|
||||||
|
|
||||||
|
SDL_SetCursor(NULL); // Update cursor visibility
|
||||||
}
|
}
|
||||||
|
|
||||||
// Public functions
|
// Public functions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue