[Linux] Additional debugging info on shutdown

This commit is contained in:
thefiddler 2014-07-18 10:05:13 +02:00
parent 51c05ea1a5
commit a38e267156
3 changed files with 14 additions and 0 deletions

View file

@ -169,16 +169,19 @@ namespace OpenTK.Platform.Linux
{
if (egl_display != IntPtr.Zero)
{
Debug.Print("[KMS] Terminating EGL.");
Egl.Terminate(egl_display);
egl_display = IntPtr.Zero;
}
if (gbm_device != IntPtr.Zero)
{
Debug.Print("[KMS] Destroying GBM device.");
Gbm.DestroyDevice(gbm_device);
gbm_device = IntPtr.Zero;
}
if (_fd >= 0)
{
Debug.Print("[KMS] Closing GPU fd.");
Libc.close(_fd);
}

View file

@ -655,6 +655,7 @@ namespace OpenTK.Platform.Linux
{
if (input_context != IntPtr.Zero)
{
Debug.Print("[Input] Destroying libinput context");
LibInput.Suspend(input_context);
Interlocked.Increment(ref exit);
@ -664,12 +665,17 @@ namespace OpenTK.Platform.Linux
if (udev != IntPtr.Zero)
{
Debug.Print("[Input] Destroying udev context");
Udev.Destroy(udev);
udev = IntPtr.Zero;
}
input_interface = null;
}
else
{
Debug.Print("[Input] {0} leaked. Did you forget to call Dispose()?", GetType().FullName);
}
}
~LinuxInput()

View file

@ -378,9 +378,14 @@ namespace OpenTK.Platform.Linux
{
if (disposing)
{
Debug.Print("[KMS] Destroying window {0}.", window.Handle);
window.Dispose();
Gbm.DestroySurface(window.Handle);
}
else
{
Debug.Print("[KMS] {0} leaked. Did you forget to call Dispose()?", GetType().FullName);
}
}
public override Icon Icon