mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-18 07:41:45 +00:00
Use densityDpi instead of density to more closely match what the UI scale is
This commit is contained in:
@@ -122,7 +122,8 @@ public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||||||
mDisplay.getRealMetrics( realMetrics );
|
mDisplay.getRealMetrics( realMetrics );
|
||||||
nDeviceWidth = realMetrics.widthPixels;
|
nDeviceWidth = realMetrics.widthPixels;
|
||||||
nDeviceHeight = realMetrics.heightPixels;
|
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) {
|
} catch(Exception ignored) {
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user