mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 14:35:40 +00:00
Added diagnostic message when ReleaseDC fails.
This commit is contained in:
parent
2277bf8576
commit
9bdc21cabd
|
@ -1,6 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace OpenTK.Platform.Windows
|
namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
|
@ -95,7 +97,8 @@ namespace OpenTK.Platform.Windows
|
||||||
if (!disposed)
|
if (!disposed)
|
||||||
{
|
{
|
||||||
if (this.dc != IntPtr.Zero)
|
if (this.dc != IntPtr.Zero)
|
||||||
Functions.ReleaseDC(this.handle, this.dc);
|
if (!Functions.ReleaseDC(this.handle, this.dc))
|
||||||
|
Debug.Print("[Warning] Failed to release device context {0}. Windows error: {1}.", this.dc, Marshal.GetLastWin32Error());
|
||||||
|
|
||||||
if (manual)
|
if (manual)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue