mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
ANDROID: Sync 3D backend HiDPI with 2D one
This commit is contained in:
parent
f12409d321
commit
04e05e7a5f
@ -970,6 +970,17 @@ void AndroidGraphics3dManager::clearScreen(FixupType type, byte count) {
|
||||
_force_redraw = true;
|
||||
}
|
||||
|
||||
float AndroidGraphics3dManager::getHiDPIScreenFactor() const {
|
||||
// TODO: Use JNI to get DisplayMetrics.density, which according to the documentation
|
||||
// seems to be what we want.
|
||||
// "On a medium-density screen, DisplayMetrics.density equals 1.0; on a high-density
|
||||
// screen it equals 1.5; on an extra-high-density screen, it equals 2.0; and on a
|
||||
// low-density screen, it equals 0.75. This figure is the factor by which you should
|
||||
// multiply the dp units in order to get the actual pixel count for the current screen."
|
||||
|
||||
return 2.f;
|
||||
}
|
||||
|
||||
AndroidCommonGraphics::State AndroidGraphics3dManager::getState() const {
|
||||
AndroidCommonGraphics::State state;
|
||||
|
||||
|
@ -110,6 +110,7 @@ public:
|
||||
const Graphics::PixelFormat *format) override;
|
||||
virtual void setCursorPalette(const byte *colors, uint start, uint num) override;
|
||||
|
||||
float getHiDPIScreenFactor() const override;
|
||||
|
||||
#ifdef USE_RGB_COLOR
|
||||
virtual Graphics::PixelFormat getScreenFormat() const override;
|
||||
|
Loading…
Reference in New Issue
Block a user