mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 11:58:12 +00:00
SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE can be combined with SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE
This commit is contained in:
@@ -2534,8 +2534,7 @@ extern "C" {
|
|||||||
* - "1": Relative mouse motion will be scaled using the system mouse
|
* - "1": Relative mouse motion will be scaled using the system mouse
|
||||||
* acceleration curve.
|
* acceleration curve.
|
||||||
*
|
*
|
||||||
* If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the
|
* If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will apply before the system speed scale.
|
||||||
* system speed scale.
|
|
||||||
*
|
*
|
||||||
* This hint can be set anytime.
|
* This hint can be set anytime.
|
||||||
*
|
*
|
||||||
|
@@ -672,10 +672,9 @@ static void SDL_PrivateSendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL
|
|||||||
if (mouse->enable_relative_speed_scale) {
|
if (mouse->enable_relative_speed_scale) {
|
||||||
x *= mouse->relative_speed_scale;
|
x *= mouse->relative_speed_scale;
|
||||||
y *= mouse->relative_speed_scale;
|
y *= mouse->relative_speed_scale;
|
||||||
} else if (mouse->enable_relative_system_scale) {
|
}
|
||||||
if (mouse->ApplySystemScale) {
|
if (mouse->enable_relative_system_scale && mouse->ApplySystemScale) {
|
||||||
mouse->ApplySystemScale(mouse->system_scale_data, timestamp, window, mouseID, &x, &y);
|
mouse->ApplySystemScale(mouse->system_scale_data, timestamp, window, mouseID, &x, &y);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mouse->enable_normal_speed_scale) {
|
if (mouse->enable_normal_speed_scale) {
|
||||||
|
Reference in New Issue
Block a user