mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-04 19:07:18 +00:00
Android: display_mode scale: cast to do a float division
This commit is contained in:
@@ -122,8 +122,8 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
mDisplay.getRealMetrics( realMetrics );
|
||||
nDeviceWidth = realMetrics.widthPixels;
|
||||
nDeviceHeight = realMetrics.heightPixels;
|
||||
// Use densityDpi instead of density to more closely match what the UI scale is
|
||||
density = realMetrics.densityDpi / 160;
|
||||
// Use densityDpi instead of density to more closely match what the UI scale is
|
||||
density = (float)realMetrics.densityDpi / 160.0f;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user