Author: gnorton
Date: 2007-12-04 09:52:05 -0500 (Tue, 04 Dec 2007)
New Revision: 90681
Modified:
branches/mono-1-2-6/libgdiplus/src/ChangeLog
branches/mono-1-2-6/libgdiplus/src/general.c
Log:
2007-12-04 Geoff Norton <[EMAIL PROTECTED]>
* general.c: Optimize the code path to only check the environment
variable once for dpi detection on the Mac.
Modified: branches/mono-1-2-6/libgdiplus/src/ChangeLog
===================================================================
--- branches/mono-1-2-6/libgdiplus/src/ChangeLog 2007-12-04 14:37:03 UTC
(rev 90680)
+++ branches/mono-1-2-6/libgdiplus/src/ChangeLog 2007-12-04 14:52:05 UTC
(rev 90681)
@@ -1,3 +1,8 @@
+2007-12-04 Geoff Norton <[EMAIL PROTECTED]>
+
+ * general.c: Optimize the code path to only check the environment
+ variable once for dpi detection on the Mac.
+
2007-11-16 Sebastien Pouliot <[EMAIL PROTECTED]>
[Backport r89764]
Modified: branches/mono-1-2-6/libgdiplus/src/general.c
===================================================================
--- branches/mono-1-2-6/libgdiplus/src/general.c 2007-12-04 14:37:03 UTC
(rev 90680)
+++ branches/mono-1-2-6/libgdiplus/src/general.c 2007-12-04 14:52:05 UTC
(rev 90681)
@@ -124,11 +124,14 @@
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) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches