My kernel gives me the following values for width and height, vi.xres = 720 vi.yres = 1280
But in nsWindow.cpp, width and height is reduced to 360 and 640 respectively, exactly reduced by half. Can someone help me to fix this? Work around to change the get the dpi value actually worked. But there is a issue with the camera app. Regards, Manjunatha On Fri, Nov 22, 2013 at 11:07 PM, an <[email protected]> wrote: > On Friday, November 22, 2013 7:17:11 PM UTC+2, Tim Chien wrote: > > 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? > > It was a proper fix for me, if I remember correctly someone suggested this > fix to the issue you (and others) encountered on Bugzilla but it was > considered not proper. Fact is that GetGonkDisplay()->xdpi doesn't return > what's supposed to on some devices. > > > > > > > > > -- > > > > 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 > -- Regards, Manjunatha _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
