diff options
| author | 2009-07-29 00:38:58 +0200 | |
|---|---|---|
| committer | 2009-07-29 00:38:58 +0200 | |
| commit | 31469e1069a873993ff43dec803bf5f14fad0fb5 (patch) | |
| tree | 0751397ae1ff717ee212badc0aa404ba44219274 /libs | |
| parent | dccff9690cce09b4f8461d1d7874bb0692efb9fb (diff) | |
Reset the mDpiX and mDpiY values when qemu.sf.lcd_density is defined.
This will make android.view.Display return corresponding values for
the screen's DPI.
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp index eec645edc9..ab02fa0ee1 100644 --- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp +++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp @@ -197,6 +197,9 @@ void DisplayHardware::init(uint32_t dpy) LOGW("ro.sf.lcd_density not defined, using 160 dpi by default."); strcpy(property, "160"); } + } else { + /* for the emulator case, reset the dpi values too */ + mDpiX = mDpiY = atoi(property); } mDensity = atoi(property) * (1.0f/160.0f); |