fix IOE in X11KeyInput.Update()
This commit is contained in:
parent
ac3913ded3
commit
a320928a6f
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using BizHawk.Client.Common;
|
using BizHawk.Client.Common;
|
||||||
using BizHawk.Common.CollectionExtensions;
|
using BizHawk.Common.CollectionExtensions;
|
||||||
|
|
||||||
|
@ -66,6 +66,12 @@ namespace BizHawk.Bizware.Input
|
||||||
{
|
{
|
||||||
lock (_syncObject)
|
lock (_syncObject)
|
||||||
{
|
{
|
||||||
|
// Can't update without a display connection
|
||||||
|
if (Display == IntPtr.Zero)
|
||||||
|
{
|
||||||
|
return Enumerable.Empty<KeyEvent>();
|
||||||
|
}
|
||||||
|
|
||||||
var keys = stackalloc byte[32];
|
var keys = stackalloc byte[32];
|
||||||
|
|
||||||
using (new XLock(Display))
|
using (new XLock(Display))
|
||||||
|
|
Loading…
Reference in New Issue