Skip to content
Browse files

2007-12-04 Geoff Norton <gnorton@novell.com>

	* general.c:  Optimize the code path to only check the environment
	variable once for dpi detection on the Mac.

svn path=/branches/mono-1-2-6/libgdiplus/; revision=90681
  • Loading branch information...
1 parent e247e39 commit 0b676e9cd4bf2f6aa810d5c9febf741455e203f9 Geoff Norton committed Dec 4, 2007
Showing with 10 additions and 2 deletions.
  1. +5 −0 src/ChangeLog
  2. +5 −2 src/general.c
View
5 src/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-04 Geoff Norton <gnorton@novell.com>
+
+ * general.c: Optimize the code path to only check the environment
+ variable once for dpi detection on the Mac.
+
2007-11-16 Sebastien Pouliot <sebastien@ximian.com>
[Backport r89764]
View
7 src/general.c
@@ -124,11 +124,14 @@ gdip_get_display_dpi ()
static float dpis = 0;
Display* display;
- if (getenv ("MONO_MWF_USE_QUARTZ_BACKEND") != NULL)
- dpis = 96.0f;
if (dpis == 0) {
char *val;
+ if (getenv ("MONO_MWF_USE_QUARTZ_BACKEND") != NULL) {
+ dpis = 96.0f;
+ return dpis;
+ }
+
display = XOpenDisplay (0);
/* If the display is openable lets try to read dpi from it; otherwise use a default of 96.0f */
if (display) {

0 comments on commit 0b676e9

Please sign in to comment.
Something went wrong with that request. Please try again.