Use densityDpi instead of density to more closely match what the UI scale is
parent
6dc135413a
commit
162e40c982
|
@ -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) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue