Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRDP/GdiTest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Moreau <marcandre.moreau@gmail.com>2011-03-27 18:26:21 +0400
committerMarc-André Moreau <marcandre.moreau@gmail.com>2011-03-27 18:26:21 +0400
commit40d99b0fb12a3b415fc787d87fc136b9dc6cebae (patch)
tree9394b1dfb10681592f8ac03fdd40e2b2acd16113
parent1287621e3ade030720d05b1d3cc042e83707d668 (diff)
Prevent crash on non-Windows systems
-rw-r--r--GdiTest.userprefs7
-rw-r--r--GdiTest/BitBltDrawingArea.cs11
-rw-r--r--GdiTest/GdiTest.pidbbin7093 -> 12029 bytes
3 files changed, 8 insertions, 10 deletions
diff --git a/GdiTest.userprefs b/GdiTest.userprefs
index e820017..95fb57a 100644
--- a/GdiTest.userprefs
+++ b/GdiTest.userprefs
@@ -1,11 +1,6 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
- <MonoDevelop.Ide.Workbench ActiveDocument="GdiTest\MainWindow.cs">
- <Files>
- <File FileName="GdiTest\Main.cs" Line="27" Column="1" />
- <File FileName="GdiTest\MainWindow.cs" Line="18" Column="1" />
- </Files>
- </MonoDevelop.Ide.Workbench>
+ <MonoDevelop.Ide.Workbench />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
diff --git a/GdiTest/BitBltDrawingArea.cs b/GdiTest/BitBltDrawingArea.cs
index eaa98e2..5f1af9d 100644
--- a/GdiTest/BitBltDrawingArea.cs
+++ b/GdiTest/BitBltDrawingArea.cs
@@ -32,11 +32,14 @@ namespace GdiTest
cg.MoveTo (10, 10);
cg.LineTo (110, 110);
cg.Stroke ();
-
- System.Drawing.Graphics wg = Gtk.DotNet.Graphics.FromDrawable(this.GdkWindow, true);
- IntPtr dc = wg.GetHdc();
- Gdi32.BitBlt(dc, 70, 0, 60, 60, dc, 0, 0, Gdi32.SRCCOPY);
+ if (Gdi32.getWin32())
+ {
+ System.Drawing.Graphics wg = Gtk.DotNet.Graphics.FromDrawable(this.GdkWindow, true);
+ IntPtr dc = wg.GetHdc();
+
+ Gdi32.BitBlt(dc, 70, 0, 60, 60, dc, 0, 0, Gdi32.SRCCOPY);
+ }
}
return true;
}
diff --git a/GdiTest/GdiTest.pidb b/GdiTest/GdiTest.pidb
index 46e69f3..f29b539 100644
--- a/GdiTest/GdiTest.pidb
+++ b/GdiTest/GdiTest.pidb
Binary files differ