Added SDL_HINT_MOUSE_DPI_SCALE_CURSORS
We only want to change cursor display scale if the application or the user opts in by setting a hint. Otherwise cursors could change size unexpectedly when upgrading to SDL 3.4.0.
This commit is contained in:
@@ -2692,6 +2692,20 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"
|
||||
|
||||
/**
|
||||
* A variable setting whether we should scale cursors by the current display scale.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": Cursors will not change size based on the display content scale. (default)
|
||||
* - "1": Cursors will automatically match the display content scale (e.g. a 2x sized cursor will be used when the window is on a monitor with 200% scale). This is currently implemented on Windows and Wayland.
|
||||
*
|
||||
* This hint needs to be set before creating cursors.
|
||||
*
|
||||
* \since This hint is available since SDL 3.4.0.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DPI_SCALE_CURSORS "SDL_MOUSE_DPI_SCALE_CURSORS"
|
||||
|
||||
/**
|
||||
* A variable controlling whether warping a hidden mouse cursor will activate
|
||||
* relative mouse mode.
|
||||
|
||||
Reference in New Issue
Block a user