Resolve KeyCode data type issue on Neko

This commit is contained in:
Joshua Granick
2022-01-13 15:11:11 -08:00
parent 2f35e0b24c
commit 45955412eb

View File

@@ -254,7 +254,8 @@ class NativeApplication
if (window != null) if (window != null)
{ {
var type:KeyEventType = keyEventInfo.type; var type:KeyEventType = keyEventInfo.type;
var keyCode:KeyCode = keyEventInfo.keyCode; var int32:Float = keyEventInfo.keyCode;
var keyCode:KeyCode = Std.int(int32);
var modifier:KeyModifier = keyEventInfo.modifier; var modifier:KeyModifier = keyEventInfo.modifier;
switch (type) switch (type)
@@ -738,12 +739,12 @@ class NativeApplication
@:keep /*private*/ class KeyEventInfo @:keep /*private*/ class KeyEventInfo
{ {
public var keyCode:Int; public var keyCode:Float;
public var modifier:Int; public var modifier:Int;
public var type:KeyEventType; public var type:KeyEventType;
public var windowID:Int; public var windowID:Int;
public function new(type:KeyEventType = null, windowID:Int = 0, keyCode:Int = 0, modifier:Int = 0) public function new(type:KeyEventType = null, windowID:Int = 0, keyCode:Float = 0, modifier:Int = 0)
{ {
this.type = type; this.type = type;
this.windowID = windowID; this.windowID = windowID;