[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) if (egl_display != IntPtr.Zero)
{ {
Debug.Print("[KMS] Terminating EGL.");
Egl.Terminate(egl_display); Egl.Terminate(egl_display);
egl_display = IntPtr.Zero; egl_display = IntPtr.Zero;
} }
if (gbm_device != IntPtr.Zero) if (gbm_device != IntPtr.Zero)
{ {
Debug.Print("[KMS] Destroying GBM device.");
Gbm.DestroyDevice(gbm_device); Gbm.DestroyDevice(gbm_device);
gbm_device = IntPtr.Zero; gbm_device = IntPtr.Zero;
} }
if (_fd >= 0) if (_fd >= 0)
{ {
Debug.Print("[KMS] Closing GPU fd.");
Libc.close(_fd); Libc.close(_fd);
} }

View file

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

View file

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