Mouse coordinates are floating point

You can get sub-pixel mouse coordinates and motion depending on the platform and display scaling.

Fixes https://github.com/libsdl-org/SDL/issues/2999
This commit is contained in:
Sam Lantinga
2022-12-29 19:31:12 -08:00
parent 8c3239dee5
commit cefbeb582f
52 changed files with 564 additions and 654 deletions

View File

@@ -921,7 +921,7 @@ static void IOS_MFIJoystickUpdate(SDL_Joystick *joystick)
for (id key in controller.physicalInputProfile.axes) {
GCControllerAxisInput *axis = controller.physicalInputProfile.axes[key];
if (axis.value != 0.0f)
NSLog(@"Axis %@ = %.2f\n", key, axis.value);
NSLog(@"Axis %@ = %g\n", key, axis.value);
}
}
}