mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-16 16:37:34 +00:00
Fixed build warnings.
This commit is contained in:
parent
e6303e9e5b
commit
057759177b
|
@ -66,6 +66,8 @@ namespace OpenTK.Platform.Windows
|
||||||
currentWindow = (WinWindowInfo)window;
|
currentWindow = (WinWindowInfo)window;
|
||||||
if (currentWindow.WindowHandle == IntPtr.Zero) throw new ArgumentException("window", "Must be a valid window.");
|
if (currentWindow.WindowHandle == IntPtr.Zero) throw new ArgumentException("window", "Must be a valid window.");
|
||||||
|
|
||||||
|
this.format = format;
|
||||||
|
|
||||||
Debug.Print("OpenGL will be bound to handle: {0}", currentWindow.WindowHandle);
|
Debug.Print("OpenGL will be bound to handle: {0}", currentWindow.WindowHandle);
|
||||||
|
|
||||||
Debug.Write("Setting pixel format... ");
|
Debug.Write("Setting pixel format... ");
|
||||||
|
@ -110,7 +112,7 @@ namespace OpenTK.Platform.Windows
|
||||||
public void CreateContext()
|
public void CreateContext()
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
this.CreateContext(true, null);
|
//this.CreateContext(true, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -120,7 +122,7 @@ namespace OpenTK.Platform.Windows
|
||||||
public void CreateContext(bool direct)
|
public void CreateContext(bool direct)
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
this.CreateContext(direct, null);
|
//this.CreateContext(direct, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -40,13 +40,13 @@ namespace OpenTK.Platform.Windows
|
||||||
private WindowState windowState = WindowState.Normal;
|
private WindowState windowState = WindowState.Normal;
|
||||||
|
|
||||||
private int top, bottom, left, right;
|
private int top, bottom, left, right;
|
||||||
private int width = 0, height = 0;
|
//private int width = 0, height = 0;
|
||||||
private Rectangle previous_client_area;
|
private Rectangle previous_client_area;
|
||||||
|
|
||||||
private Point position = new Point();
|
private Point position = new Point();
|
||||||
private Rectangle client_rectangle = new Rectangle();
|
private Rectangle client_rectangle = new Rectangle();
|
||||||
private Size window_size = new Size();
|
private Size window_size = new Size();
|
||||||
private Rectangle borders = new Rectangle();
|
//private Rectangle borders = new Rectangle();
|
||||||
|
|
||||||
private ResizeEventArgs resizeEventArgs = new ResizeEventArgs();
|
private ResizeEventArgs resizeEventArgs = new ResizeEventArgs();
|
||||||
|
|
||||||
|
@ -603,10 +603,13 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#region public void OnResize
|
#region public void OnResize
|
||||||
|
|
||||||
public event ResizeEvent Resize = null;
|
public event ResizeEvent Resize;
|
||||||
|
|
||||||
public void OnResize(ResizeEventArgs e)
|
public void OnResize(ResizeEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (Resize != null)
|
||||||
|
Resize(this, e);
|
||||||
|
|
||||||
throw new NotImplementedException("Use GameWindow.OnResize instead.");
|
throw new NotImplementedException("Use GameWindow.OnResize instead.");
|
||||||
//this.width = e.Width;
|
//this.width = e.Width;
|
||||||
//this.height = e.Height;
|
//this.height = e.Height;
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace OpenTK.Platform.X11
|
||||||
static int screenCount;
|
static int screenCount;
|
||||||
|
|
||||||
internal static Display DefaultDisplay { get { return defaultDisplay; } }
|
internal static Display DefaultDisplay { get { return defaultDisplay; } }
|
||||||
//internal static int DefaultScreen { get { return defaultScreen; } }
|
static int DefaultScreen { get { return defaultScreen; } }
|
||||||
//internal static Window RootWindow { get { return rootWindow; } }
|
//internal static Window RootWindow { get { return rootWindow; } }
|
||||||
internal static int ScreenCount { get { return screenCount; } }
|
internal static int ScreenCount { get { return screenCount; } }
|
||||||
|
|
||||||
|
@ -743,6 +743,8 @@ XF86VidModeGetGammaRampSize(
|
||||||
|
|
||||||
#region unsafe internal class XExtData
|
#region unsafe internal class XExtData
|
||||||
|
|
||||||
|
#pragma warning disable 0169, 0649
|
||||||
|
|
||||||
unsafe internal class XExtData
|
unsafe internal class XExtData
|
||||||
{
|
{
|
||||||
int number; /* number returned by XRegisterExtension */
|
int number; /* number returned by XRegisterExtension */
|
||||||
|
|
|
@ -61,16 +61,16 @@ namespace OpenTK.Platform.X11
|
||||||
IntPtr _atom_net_wm_action_maximize_horizontally;
|
IntPtr _atom_net_wm_action_maximize_horizontally;
|
||||||
IntPtr _atom_net_wm_action_maximize_vertically;
|
IntPtr _atom_net_wm_action_maximize_vertically;
|
||||||
|
|
||||||
IntPtr _atom_motif_wm_hints;
|
//IntPtr _atom_motif_wm_hints;
|
||||||
IntPtr _atom_kde_wm_hints;
|
//IntPtr _atom_kde_wm_hints;
|
||||||
IntPtr _atom_kde_net_wm_hints;
|
//IntPtr _atom_kde_net_wm_hints;
|
||||||
|
|
||||||
static readonly IntPtr _atom_remove = (IntPtr)0;
|
static readonly IntPtr _atom_remove = (IntPtr)0;
|
||||||
static readonly IntPtr _atom_add = (IntPtr)1;
|
static readonly IntPtr _atom_add = (IntPtr)1;
|
||||||
static readonly IntPtr _atom_toggle = (IntPtr)2;
|
static readonly IntPtr _atom_toggle = (IntPtr)2;
|
||||||
|
|
||||||
// Number of pending events.
|
// Number of pending events.
|
||||||
int pending = 0;
|
//int pending = 0;
|
||||||
|
|
||||||
int width, height;
|
int width, height;
|
||||||
int top, bottom, left, right;
|
int top, bottom, left, right;
|
||||||
|
@ -86,11 +86,11 @@ namespace OpenTK.Platform.X11
|
||||||
bool isExiting;
|
bool isExiting;
|
||||||
|
|
||||||
// XAtoms for window properties
|
// XAtoms for window properties
|
||||||
static IntPtr WMTitle; // The title of the GameWindow.
|
//static IntPtr WMTitle; // The title of the GameWindow.
|
||||||
static IntPtr UTF8String; // No idea.
|
//static IntPtr UTF8String; // No idea.
|
||||||
|
|
||||||
// Fields used for fullscreen mode changes.
|
// Fields used for fullscreen mode changes.
|
||||||
int pre_fullscreen_width, pre_fullscreen_height;
|
//int pre_fullscreen_width, pre_fullscreen_height;
|
||||||
//bool fullscreen = false;
|
//bool fullscreen = false;
|
||||||
|
|
||||||
bool _decorations_hidden = false;
|
bool _decorations_hidden = false;
|
||||||
|
@ -646,7 +646,7 @@ namespace OpenTK.Platform.X11
|
||||||
IntPtr bytes_after;
|
IntPtr bytes_after;
|
||||||
IntPtr prop = IntPtr.Zero;
|
IntPtr prop = IntPtr.Zero;
|
||||||
IntPtr atom;
|
IntPtr atom;
|
||||||
XWindowAttributes attributes;
|
//XWindowAttributes attributes;
|
||||||
bool fullscreen = false;
|
bool fullscreen = false;
|
||||||
int maximized = 0;
|
int maximized = 0;
|
||||||
bool minimized = false;
|
bool minimized = false;
|
||||||
|
@ -995,7 +995,7 @@ namespace OpenTK.Platform.X11
|
||||||
IntPtr bytes_after;
|
IntPtr bytes_after;
|
||||||
IntPtr prop = IntPtr.Zero;
|
IntPtr prop = IntPtr.Zero;
|
||||||
IntPtr atom;
|
IntPtr atom;
|
||||||
XWindowAttributes attributes;
|
//XWindowAttributes attributes;
|
||||||
|
|
||||||
Functions.XGetWindowProperty(window.Display, window.WindowHandle,
|
Functions.XGetWindowProperty(window.Display, window.WindowHandle,
|
||||||
_atom_net_wm_allowed_actions, IntPtr.Zero, new IntPtr(256), false,
|
_atom_net_wm_allowed_actions, IntPtr.Zero, new IntPtr(256), false,
|
||||||
|
@ -1023,13 +1023,13 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
IntPtr actual_atom;
|
//IntPtr actual_atom;
|
||||||
int actual_format;
|
//int actual_format;
|
||||||
IntPtr nitems;
|
//IntPtr nitems;
|
||||||
IntPtr bytes_after;
|
//IntPtr bytes_after;
|
||||||
IntPtr prop = IntPtr.Zero;
|
IntPtr prop = IntPtr.Zero;
|
||||||
IntPtr atom;
|
//IntPtr atom;
|
||||||
XWindowAttributes attributes;
|
//XWindowAttributes attributes;
|
||||||
|
|
||||||
// Test if decorations have been disabled through Motif.
|
// Test if decorations have been disabled through Motif.
|
||||||
IntPtr motif_hints_atom = Functions.XInternAtom(this.window.Display, MOTIF_WM_ATOM, true);
|
IntPtr motif_hints_atom = Functions.XInternAtom(this.window.Display, MOTIF_WM_ATOM, true);
|
||||||
|
|
Loading…
Reference in a new issue