On Fri, Nov 22, 2013 at 9:44 PM, an <[email protected]> wrote:
> On Friday, November 22, 2013 1:30:37 PM UTC+2, Alexandre Lissy wrote:
>> >> https://mxr.mozilla.org/mozilla-central/source/widget/gonk/nsWindow.cpp#539
>
> There is this hack I found for that file which worked for me:
>
> nsWindow::GetDPI()
>  {
>     // Note that xdpi value depends on graphic HAL and FB driver 
> implementation
>     // sometimes unreliable while ro.sf.lcd_density is defined in 
> PRODUCT_PROPE
>     // we have.
>     // Query xdpi from ANativeWindow except if ro.sf.lcd_density property is 
> av
>     char density[PROPERTY_VALUE_MAX];
>     property_get("ro.sf.lcd_density", density, nullptr);
>
>     return density ? atoi(density) : NativeWindow()->xdpi;
>  }
>

Wow, thank for the tip! I wonder if this is not a "hack" but actually
a proper fix?

-- 
Tim Guan-tin Chien, Engineering Manager and Front-end Lead, Firefox
OS, Mozilla Corp. (Taiwan)
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to