From 95d5db5347c3ba0e92be22d637384bde3a9052a5 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 5 Aug 2007 13:51:07 +0000 Subject: [PATCH] Removed exceptions from Fullscreen properties. --- Source/Examples/Tutorial/T03_RotatingCube.cs | 2 +- Source/OpenTK/GLControl.cs | 8 ++++---- Source/OpenTK/Platform/Windows/WinGLControl.cs | 3 ++- Source/OpenTK/Platform/Windows/WinGLNative.cs | 4 +++- Source/OpenTK/Platform/X11/X11GLControl.cs | 3 ++- Source/OpenTK/Platform/X11/X11GLNative.cs | 6 ++++-- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Source/Examples/Tutorial/T03_RotatingCube.cs b/Source/Examples/Tutorial/T03_RotatingCube.cs index 60b5dcd6..e8129721 100644 --- a/Source/Examples/Tutorial/T03_RotatingCube.cs +++ b/Source/Examples/Tutorial/T03_RotatingCube.cs @@ -90,7 +90,7 @@ namespace Examples.Tutorial if ((Keyboard[0][OpenTK.Input.Keys.LeftAlt] || Keyboard[0][OpenTK.Input.Keys.RightAlt]) && Keyboard[0][OpenTK.Input.Keys.Enter]) { - Fullscreen = true; + Fullscreen = !Fullscreen; } GL.MatrixMode(Enums.MatrixMode.MODELVIEW); diff --git a/Source/OpenTK/GLControl.cs b/Source/OpenTK/GLControl.cs index af215f59..caf65575 100644 --- a/Source/OpenTK/GLControl.cs +++ b/Source/OpenTK/GLControl.cs @@ -84,8 +84,7 @@ namespace OpenTK if (height > 0) this.Height = height; */ - if (mode.Fullscreen) - this.Fullscreen = true; + this.Fullscreen = mode.Fullscreen; this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); @@ -135,11 +134,12 @@ namespace OpenTK { get { - throw new NotImplementedException(); + return false; + //throw new NotImplementedException(); } set { - throw new NotImplementedException(); + //throw new NotImplementedException(); } } diff --git a/Source/OpenTK/Platform/Windows/WinGLControl.cs b/Source/OpenTK/Platform/Windows/WinGLControl.cs index 6f43541c..4a44162c 100644 --- a/Source/OpenTK/Platform/Windows/WinGLControl.cs +++ b/Source/OpenTK/Platform/Windows/WinGLControl.cs @@ -71,7 +71,8 @@ namespace OpenTK.Platform.Windows } set { - throw new NotImplementedException(); + fullscreen = false; + //throw new NotImplementedException(); } } diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index c65a0d27..dc20cfac 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -317,10 +317,12 @@ namespace OpenTK.Platform.Windows { get { - throw new NotImplementedException(); + return false; + //throw new NotImplementedException(); } set { + fullscreen = false; throw new NotImplementedException(); } } diff --git a/Source/OpenTK/Platform/X11/X11GLControl.cs b/Source/OpenTK/Platform/X11/X11GLControl.cs index 2361f464..0a2a8ce9 100644 --- a/Source/OpenTK/Platform/X11/X11GLControl.cs +++ b/Source/OpenTK/Platform/X11/X11GLControl.cs @@ -158,7 +158,8 @@ namespace OpenTK.Platform.X11 } set { - throw new Exception("The method or operation is not implemented."); + //throw new Exception("The method or operation is not implemented."); + fullscreen = false; } } diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index ef480aaf..d6d63b06 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -334,11 +334,13 @@ namespace OpenTK.Platform.X11 { get { - throw new Exception("The method or operation is not implemented."); + return false; + //throw new Exception("The method or operation is not implemented."); } set { - throw new Exception("The method or operation is not implemented."); + + //throw new Exception("The method or operation is not implemented."); } }