Fix encoding of linux_build.patch

This commit is contained in:
Marshall Greenblatt 2017-08-01 12:58:56 -04:00
parent 9809504014
commit 8c8deea63a
1 changed files with 17 additions and 17 deletions

View File

@ -1,17 +1,17 @@
diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc diff --git chrome/browser/ui/libgtkui/gtk_ui.cc chrome/browser/ui/libgtkui/gtk_ui.cc
index 7df1d0c..3dd3209 100644 index 7df1d0c..3dd3209 100644
--- chrome/browser/ui/libgtkui/gtk_ui.cc --- chrome/browser/ui/libgtkui/gtk_ui.cc
+++ chrome/browser/ui/libgtkui/gtk_ui.cc +++ chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -320,8 +320,12 @@ float GetRawDeviceScaleFactor() { @@ -320,8 +320,12 @@ float GetRawDeviceScaleFactor() {
return display::Display::GetForcedDeviceScaleFactor(); return display::Display::GetForcedDeviceScaleFactor();
GdkScreen* screen = gdk_screen_get_default(); GdkScreen* screen = gdk_screen_get_default();
+#if GTK_MAJOR_VERSION == 3 +#if GTK_MAJOR_VERSION == 3
gint scale = gdk_screen_get_monitor_scale_factor( gint scale = gdk_screen_get_monitor_scale_factor(
screen, gdk_screen_get_primary_monitor(screen)); screen, gdk_screen_get_primary_monitor(screen));
+#else +#else
+ gint scale = 1; + gint scale = 1;
+#endif +#endif
gdouble resolution = gdk_screen_get_resolution(screen); gdouble resolution = gdk_screen_get_resolution(screen);
return resolution <= 0 ? scale : resolution * scale / kDefaultDPI; return resolution <= 0 ? scale : resolution * scale / kDefaultDPI;
} }