mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 05:35:35 +00:00
Change bool to IntPtr.
WindowProc returns an IntPtr not a bool, so let Handle* functions return IntPtr?. If they return a value we return that, if they return null we call DefWindowProc and return the result from that.
This commit is contained in:
parent
9239fd08e3
commit
9ed32e4445
|
@ -388,15 +388,15 @@ namespace OpenTK.Platform.Windows
|
|||
}
|
||||
}
|
||||
|
||||
private bool HandleSetCursor(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
||||
private IntPtr? HandleSetCursor(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
||||
{
|
||||
if (cursor != MouseCursor.Default)
|
||||
{
|
||||
Functions.SetCursor(curson_handle);
|
||||
return true;
|
||||
return new IntPtr(1);
|
||||
}
|
||||
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
void HandleChar(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
||||
|
@ -666,7 +666,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
IntPtr WindowProcedure(IntPtr handle, WindowMessage message, IntPtr wParam, IntPtr lParam)
|
||||
{
|
||||
bool result = false;
|
||||
IntPtr? result = null;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
|
@ -791,10 +791,9 @@ namespace OpenTK.Platform.Windows
|
|||
#endregion
|
||||
}
|
||||
|
||||
if (result)
|
||||
if (result.HasValue)
|
||||
{
|
||||
// Return TRUE
|
||||
return new IntPtr(1);
|
||||
return result.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue