X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=webdvd.cpp;h=31ad122776a154586a14ea9baf4e7642331dcd5a;hb=86602dfc3c0f036cc061277b70607e2631b50229;hp=cc47bd140eb026f2c5fa33452057ca8b65c77dad;hpb=bd93155f1cd53bfa0eb15eaf2caf28a3b1305438;p=videolink.git diff --git a/webdvd.cpp b/webdvd.cpp index cc47bd1..31ad122 100644 --- a/webdvd.cpp +++ b/webdvd.cpp @@ -1029,16 +1029,17 @@ namespace void set_browser_preferences() { - // Disable IE-compatibility kluge that causes backgrounds to - // sometimes/usually be missing from snapshots. This is only - // effective from Mozilla 1.8 onward. -# if MOZ_VERSION_MAJOR > 1 \ - || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8) nsCOMPtr pref_service; static const nsCID pref_service_cid = NS_PREFSERVICE_CID; check(CallGetService(pref_service_cid, getter_AddRefs(pref_service))); nsCOMPtr pref_branch; + + // Disable IE-compatibility kluge that causes backgrounds to + // sometimes/usually be missing from snapshots. This is only + // effective from Mozilla 1.8 onward. +# if MOZ_VERSION_MAJOR > 1 \ + || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8) check(pref_service->GetDefaultBranch("layout", getter_AddRefs(pref_branch))); check(pref_branch->SetBoolPref( @@ -1046,9 +1047,17 @@ namespace true)); # endif - // TODO: Set display resolution? Unfortunately Mozilla doesn't - // support non-square pixels (and neither do fontconfig or Xft - // anyway). + // Set display resolution. With standard-definition video we + // will be fitting ~600 pixels across a screen typically + // ranging from 10 to 25 inches wide, for a resolution of + // 24-60 dpi. I therefore declare the average horizontal + // resolution to be 40 dpi. The vertical resolution will be + // slightly higher (PAL/SECAM) or lower (NTSC), but + // unfortunately Mozilla doesn't support non-square pixels + // (and neither do fontconfig or Xft anyway). + check(pref_service->GetDefaultBranch("browser.display", + getter_AddRefs(pref_branch))); + check(pref_branch->SetIntPref("screen_resolution", 40)); } } // namespace