mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-06-19 07:28:02 +00:00
Fixed compilation warnings on Mono 3.4.0
This commit is contained in:
parent
7a064c382a
commit
00b531fdef
|
@ -458,6 +458,8 @@ namespace OpenTK.Graphics.ES20
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the signature of a debug callback for
|
/// Defines the signature of a debug callback for
|
||||||
/// <see cref="GL.DebugMessageCallback"/>.
|
/// <see cref="GL.DebugMessageCallback"/>.
|
||||||
|
@ -491,4 +493,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
DebugSource source, DebugType type, int id,
|
DebugSource source, DebugType type, int id,
|
||||||
DebugSeverity severity, int length, IntPtr message,
|
DebugSeverity severity, int length, IntPtr message,
|
||||||
IntPtr userParam);
|
IntPtr userParam);
|
||||||
|
|
||||||
|
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,6 +449,8 @@ namespace OpenTK.Graphics.ES30
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the signature of a debug callback for
|
/// Defines the signature of a debug callback for
|
||||||
/// <see cref="GL.DebugMessageCallback"/>.
|
/// <see cref="GL.DebugMessageCallback"/>.
|
||||||
|
@ -482,4 +484,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
DebugSource source, DebugType type, int id,
|
DebugSource source, DebugType type, int id,
|
||||||
DebugSeverity severity, int length, IntPtr message,
|
DebugSeverity severity, int length, IntPtr message,
|
||||||
IntPtr userParam);
|
IntPtr userParam);
|
||||||
|
|
||||||
|
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace OpenTK.Graphics
|
||||||
Debug.Print("GraphicsContextFlags: {0}", flags);
|
Debug.Print("GraphicsContextFlags: {0}", flags);
|
||||||
Debug.Print("Requested version: {0}.{1}", major, minor);
|
Debug.Print("Requested version: {0}.{1}", major, minor);
|
||||||
|
|
||||||
IGraphicsContext shareContext = shareContext = FindSharedContext();
|
IGraphicsContext shareContext = FindSharedContext();
|
||||||
|
|
||||||
// Todo: Add a DummyFactory implementing IPlatformFactory.
|
// Todo: Add a DummyFactory implementing IPlatformFactory.
|
||||||
if (designMode)
|
if (designMode)
|
||||||
|
|
|
@ -1355,6 +1355,8 @@ namespace OpenTK.Graphics.OpenGL
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the signature of a debug callback for
|
/// Defines the signature of a debug callback for
|
||||||
/// <see cref="GL.Amd.DebugMessageCallback"/>.
|
/// <see cref="GL.Amd.DebugMessageCallback"/>.
|
||||||
|
@ -1420,4 +1422,6 @@ namespace OpenTK.Graphics.OpenGL
|
||||||
DebugSource source, DebugType type, int id,
|
DebugSource source, DebugType type, int id,
|
||||||
DebugSeverity severity, int length, IntPtr message,
|
DebugSeverity severity, int length, IntPtr message,
|
||||||
IntPtr userParam);
|
IntPtr userParam);
|
||||||
|
|
||||||
|
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
}
|
}
|
||||||
|
|
|
@ -458,6 +458,8 @@ namespace OpenTK.Graphics.OpenGL4
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the signature of a debug callback for
|
/// Defines the signature of a debug callback for
|
||||||
/// <see cref="GL.Arb.DebugMessageCallback"/>.
|
/// <see cref="GL.Arb.DebugMessageCallback"/>.
|
||||||
|
@ -508,4 +510,6 @@ namespace OpenTK.Graphics.OpenGL4
|
||||||
DebugSource source, DebugType type, int id,
|
DebugSource source, DebugType type, int id,
|
||||||
DebugSeverity severity, int length, IntPtr message,
|
DebugSeverity severity, int length, IntPtr message,
|
||||||
IntPtr userParam);
|
IntPtr userParam);
|
||||||
|
|
||||||
|
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,7 +231,6 @@ namespace OpenTK.Input
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
MouseButton button;
|
MouseButton button;
|
||||||
bool pressed;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -253,7 +252,6 @@ namespace OpenTK.Input
|
||||||
: base(x, y)
|
: base(x, y)
|
||||||
{
|
{
|
||||||
this.button = button;
|
this.button = button;
|
||||||
this.pressed = pressed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -73,6 +73,8 @@ namespace OpenTK
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
|
#pragma warning disable 3005 // Identifier differing only in case is not CLS-compliant, compiler bug in Mono 3.4.0
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
|
/// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -88,6 +90,8 @@ namespace OpenTK
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public Vector3 Xyz { get { return xyz; } set { xyz = value; } }
|
public Vector3 Xyz { get { return xyz; } set { xyz = value; } }
|
||||||
|
|
||||||
|
#pragma warning restore 3005
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the X component of this instance.
|
/// Gets or sets the X component of this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -73,6 +73,8 @@ namespace OpenTK
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
|
#pragma warning disable 3005 // Identifier differing only in case is not CLS-compliant, compiler bug in Mono 3.4.0
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
|
/// Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -87,6 +89,8 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Vector3d Xyz { get { return xyz; } set { xyz = value; } }
|
public Vector3d Xyz { get { return xyz; } set { xyz = value; } }
|
||||||
|
|
||||||
|
#pragma warning restore 3005
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the X component of this instance.
|
/// Gets or sets the X component of this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace OpenTK.Platform.MacOS
|
||||||
|
|
||||||
// Disable momentum scrolling and long-press key pop-ups
|
// Disable momentum scrolling and long-press key pop-ups
|
||||||
IntPtr settings = Cocoa.SendIntPtr(Class.NSDictionary, Selector.Alloc);
|
IntPtr settings = Cocoa.SendIntPtr(Class.NSDictionary, Selector.Alloc);
|
||||||
IntPtr momentum_scrolling = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
|
//IntPtr momentum_scrolling = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
|
||||||
IntPtr press_and_hold = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
|
IntPtr press_and_hold = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
|
||||||
|
|
||||||
// Initialize and register the settings dictionary
|
// Initialize and register the settings dictionary
|
||||||
|
|
|
@ -561,7 +561,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
for (int i = 0; i < element_array.Count; i++)
|
for (int i = 0; i < element_array.Count; i++)
|
||||||
{
|
{
|
||||||
IOHIDElementRef element_ref = element_array[i];
|
IOHIDElementRef element_ref = element_array[i];
|
||||||
IOHIDElementType type = NativeMethods.IOHIDElementGetType(element_ref);
|
|
||||||
HIDPage page = NativeMethods.IOHIDElementGetUsagePage(element_ref);
|
HIDPage page = NativeMethods.IOHIDElementGetUsagePage(element_ref);
|
||||||
int usage = NativeMethods.IOHIDElementGetUsage(element_ref);
|
int usage = NativeMethods.IOHIDElementGetUsage(element_ref);
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@ using System.Diagnostics;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
#pragma warning disable 0169
|
||||||
|
|
||||||
namespace OpenTK.Platform.SDL2
|
namespace OpenTK.Platform.SDL2
|
||||||
{
|
{
|
||||||
using Surface = IntPtr;
|
using Surface = IntPtr;
|
||||||
|
|
|
@ -33,10 +33,9 @@ namespace OpenTK.Platform.SDL2
|
||||||
{
|
{
|
||||||
class Sdl2Keyboard : IKeyboardDriver2
|
class Sdl2Keyboard : IKeyboardDriver2
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 649 // Field never assigned to, compiler bug in Mono 3.4.0
|
||||||
KeyboardState state;
|
KeyboardState state;
|
||||||
|
#pragma warning restore 649
|
||||||
readonly List<KeyboardDevice> keyboards =
|
|
||||||
new List<KeyboardDevice>();
|
|
||||||
|
|
||||||
public Sdl2Keyboard()
|
public Sdl2Keyboard()
|
||||||
{
|
{
|
||||||
|
@ -78,7 +77,6 @@ namespace OpenTK.Platform.SDL2
|
||||||
bool pressed = e.State != 0;
|
bool pressed = e.State != 0;
|
||||||
var scancode = e.Keysym.Scancode;
|
var scancode = e.Keysym.Scancode;
|
||||||
Key key = Sdl2KeyMap.GetKey(scancode);
|
Key key = Sdl2KeyMap.GetKey(scancode);
|
||||||
KeyModifiers mods = Sdl2KeyMap.GetModifiers(e.Keysym.Mod);
|
|
||||||
|
|
||||||
if (key != Key.Unknown)
|
if (key != Key.Unknown)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,6 @@ namespace OpenTK.Platform.SDL2
|
||||||
Icon icon;
|
Icon icon;
|
||||||
MouseCursor cursor = MouseCursor.Default;
|
MouseCursor cursor = MouseCursor.Default;
|
||||||
IntPtr sdl_cursor = IntPtr.Zero;
|
IntPtr sdl_cursor = IntPtr.Zero;
|
||||||
string window_title;
|
|
||||||
|
|
||||||
// Used in KeyPress event to decode SDL UTF8 text strings
|
// Used in KeyPress event to decode SDL UTF8 text strings
|
||||||
// to .Net UTF16 strings
|
// to .Net UTF16 strings
|
||||||
|
@ -100,7 +99,6 @@ namespace OpenTK.Platform.SDL2
|
||||||
window = new Sdl2WindowInfo(handle, null);
|
window = new Sdl2WindowInfo(handle, null);
|
||||||
window_id = SDL.GetWindowID(handle);
|
window_id = SDL.GetWindowID(handle);
|
||||||
windows.Add(window_id, this);
|
windows.Add(window_id, this);
|
||||||
window_title = title;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -669,7 +667,6 @@ namespace OpenTK.Platform.SDL2
|
||||||
if (Exists)
|
if (Exists)
|
||||||
{
|
{
|
||||||
SDL.SetWindowTitle(window.Handle, value);
|
SDL.SetWindowTitle(window.Handle, value);
|
||||||
window_title = value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ namespace OpenTK.Platform.Windows
|
||||||
int device_count = 0, mode_count = 0;
|
int device_count = 0, mode_count = 0;
|
||||||
|
|
||||||
// Get available video adapters and enumerate all monitors
|
// Get available video adapters and enumerate all monitors
|
||||||
WindowsDisplayDevice dev1 = new WindowsDisplayDevice(), dev2 = new WindowsDisplayDevice();
|
WindowsDisplayDevice dev1 = new WindowsDisplayDevice();
|
||||||
while (Functions.EnumDisplayDevices(null, device_count++, dev1, 0))
|
while (Functions.EnumDisplayDevices(null, device_count++, dev1, 0))
|
||||||
{
|
{
|
||||||
if ((dev1.StateFlags & DisplayDeviceStateFlags.AttachedToDesktop) == DisplayDeviceStateFlags.None)
|
if ((dev1.StateFlags & DisplayDeviceStateFlags.AttachedToDesktop) == DisplayDeviceStateFlags.None)
|
||||||
|
|
|
@ -47,9 +47,7 @@ namespace OpenTK.Platform.Windows
|
||||||
ICD,
|
ICD,
|
||||||
}
|
}
|
||||||
|
|
||||||
static readonly object SyncRoot = new object();
|
|
||||||
readonly IntPtr Device;
|
readonly IntPtr Device;
|
||||||
readonly List<GraphicsMode> modes = new List<GraphicsMode>();
|
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@ namespace OpenTK.Platform.Windows
|
||||||
readonly object sync = new object();
|
readonly object sync = new object();
|
||||||
|
|
||||||
List<JoystickDevice> sticks = new List<JoystickDevice>();
|
List<JoystickDevice> sticks = new List<JoystickDevice>();
|
||||||
IList<JoystickDevice> sticks_readonly;
|
|
||||||
|
|
||||||
// Matches a WinMM device index to a specific stick above
|
// Matches a WinMM device index to a specific stick above
|
||||||
readonly Dictionary<int, int> index_to_stick =
|
readonly Dictionary<int, int> index_to_stick =
|
||||||
|
@ -65,7 +64,6 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public WinMMJoystick()
|
public WinMMJoystick()
|
||||||
{
|
{
|
||||||
sticks_readonly = sticks.AsReadOnly();
|
|
||||||
RefreshDevices();
|
RefreshDevices();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
// Input event data.
|
// Input event data.
|
||||||
static RawInput data = new RawInput();
|
static RawInput data = new RawInput();
|
||||||
static readonly int rawInputStructSize = API.RawInputSize;
|
|
||||||
|
|
||||||
WinRawKeyboard keyboard_driver;
|
WinRawKeyboard keyboard_driver;
|
||||||
WinRawMouse mouse_driver;
|
WinRawMouse mouse_driver;
|
||||||
|
|
|
@ -31,6 +31,8 @@ using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
#pragma warning disable 0169
|
||||||
|
|
||||||
namespace OpenTK.Platform.X11
|
namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
using Atom = IntPtr;
|
using Atom = IntPtr;
|
||||||
|
|
|
@ -575,7 +575,6 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
int width = image.Width;
|
int width = image.Width;
|
||||||
int height = image.Height;
|
int height = image.Height;
|
||||||
int size = width * height;
|
|
||||||
|
|
||||||
BitmapData data = image.LockBits(new Rectangle(0, 0, width, height),
|
BitmapData data = image.LockBits(new Rectangle(0, 0, width, height),
|
||||||
ImageLockMode.ReadOnly,
|
ImageLockMode.ReadOnly,
|
||||||
|
|
|
@ -324,8 +324,6 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
short rate = 0;
|
short rate = 0;
|
||||||
IntPtr screen_config = Functions.XRRGetScreenInfo(API.DefaultDisplay, Functions.XRootWindow(API.DefaultDisplay, screen));
|
IntPtr screen_config = Functions.XRRGetScreenInfo(API.DefaultDisplay, Functions.XRootWindow(API.DefaultDisplay, screen));
|
||||||
ushort rotation = 0;
|
|
||||||
int size = Functions.XRRConfigCurrentConfiguration(screen_config, out rotation);
|
|
||||||
rate = Functions.XRRConfigCurrentRate(screen_config);
|
rate = Functions.XRRConfigCurrentRate(screen_config);
|
||||||
Functions.XRRFreeScreenConfigInfo(screen_config);
|
Functions.XRRFreeScreenConfigInfo(screen_config);
|
||||||
return (float)rate;
|
return (float)rate;
|
||||||
|
|
|
@ -76,10 +76,12 @@ namespace OpenTK.Platform.X11
|
||||||
IntPtr _atom_net_wm_state_maximized_horizontal;
|
IntPtr _atom_net_wm_state_maximized_horizontal;
|
||||||
IntPtr _atom_net_wm_state_maximized_vertical;
|
IntPtr _atom_net_wm_state_maximized_vertical;
|
||||||
|
|
||||||
|
#pragma warning disable 414 // assigned but never used
|
||||||
IntPtr _atom_net_wm_allowed_actions;
|
IntPtr _atom_net_wm_allowed_actions;
|
||||||
IntPtr _atom_net_wm_action_resize;
|
IntPtr _atom_net_wm_action_resize;
|
||||||
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;
|
||||||
|
#pragma warning restore 414
|
||||||
|
|
||||||
IntPtr _atom_net_wm_icon;
|
IntPtr _atom_net_wm_icon;
|
||||||
|
|
||||||
|
@ -91,7 +93,9 @@ namespace OpenTK.Platform.X11
|
||||||
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;
|
||||||
|
|
||||||
|
#pragma warning disable 649 // never assigned, compiler bug in Mono 3.4.0
|
||||||
Rectangle bounds, client_rectangle;
|
Rectangle bounds, client_rectangle;
|
||||||
|
#pragma warning restore 649
|
||||||
int border_left, border_right, border_top, border_bottom;
|
int border_left, border_right, border_top, border_bottom;
|
||||||
Icon icon;
|
Icon icon;
|
||||||
bool has_focus;
|
bool has_focus;
|
||||||
|
@ -123,9 +127,11 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
readonly IntPtr EmptyCursor;
|
readonly IntPtr EmptyCursor;
|
||||||
|
|
||||||
|
#pragma warning disable 414 // Field assigned but never used, we do that on purpose
|
||||||
readonly bool xi2_supported;
|
readonly bool xi2_supported;
|
||||||
readonly int xi2_opcode;
|
readonly int xi2_opcode;
|
||||||
readonly int xi2_version;
|
readonly int xi2_version;
|
||||||
|
#pragma warning restore 414
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -410,14 +416,6 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
//IntPtr actual_atom;
|
|
||||||
//int actual_format;
|
|
||||||
//IntPtr nitems;
|
|
||||||
//IntPtr bytes_after;
|
|
||||||
IntPtr prop = IntPtr.Zero;
|
|
||||||
//IntPtr atom;
|
|
||||||
//XWindowAttributes attributes;
|
|
||||||
|
|
||||||
using (new XLock(window.Display))
|
using (new XLock(window.Display))
|
||||||
{
|
{
|
||||||
// Test if decorations have been disabled through Motif.
|
// Test if decorations have been disabled through Motif.
|
||||||
|
|
|
@ -102,7 +102,6 @@ namespace OpenTK.Platform.X11
|
||||||
Debug.Print("Selecting FB config for {0}", mode);
|
Debug.Print("Selecting FB config for {0}", mode);
|
||||||
|
|
||||||
List<int> visualAttributes = new List<int>();
|
List<int> visualAttributes = new List<int>();
|
||||||
IntPtr visual = IntPtr.Zero;
|
|
||||||
|
|
||||||
if (mode.ColorFormat.BitsPerPixel > 0)
|
if (mode.ColorFormat.BitsPerPixel > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue