mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Use densityDpi instead of density to more closely match what the UI scale is
This commit is contained in:
parent
6dc135413a
commit
162e40c982
1 changed files with 2 additions and 1 deletions
|
|
@ -122,7 +122,8 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
mDisplay.getRealMetrics( realMetrics );
|
||||
nDeviceWidth = realMetrics.widthPixels;
|
||||
nDeviceHeight = realMetrics.heightPixels;
|
||||
density = realMetrics.density;
|
||||
// Use densityDpi instead of density to more closely match what the UI scale is
|
||||
density = realMetrics.densityDpi / 160;
|
||||
}
|
||||
} catch(Exception ignored) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue