Skip to content

Commit

Permalink
avm2: Add GameInput and GameInputEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Sep 18, 2022
1 parent bfca30f commit 9b9c95b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/avm2/globals/flash/events/GameInputEvent.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package flash.events {
public final class GameInputEvent extends Event {
public static const DEVICE_ADDED:String = "deviceAdded";
public static const DEVICE_REMOVED:String = "deviceRemoved";
public static const DEVICE_UNUSABLE:String = "deviceUnusable";
}
}
13 changes: 13 additions & 0 deletions core/src/avm2/globals/flash/ui/GameInput.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package flash.ui {
import flash.events.EventDispatcher;

public final class GameInput extends EventDispatcher {
public static function get isSupported():Boolean {
return false;
}

public static function get numDevices():int {
return 0;
}
}
}
2 changes: 2 additions & 0 deletions core/src/avm2/globals/globals.as
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ include "flash/events/DRMReturnVoucherCompleteEvent.as"
include "flash/events/DRMReturnVoucherErrorEvent.as"
include "flash/events/FocusEvent.as"
include "flash/events/FullScreenEvent.as"
include "flash/events/GameInputEvent.as"
include "flash/events/HTTPStatusEvent.as"
include "flash/events/IOErrorEvent.as"
include "flash/events/KeyboardEvent.as"
Expand Down Expand Up @@ -170,6 +171,7 @@ include "flash/text/TextLineMetrics.as"
include "flash/ui/ContextMenu.as"
include "flash/ui/ContextMenuBuiltInItems.as"
include "flash/ui/ContextMenuItem.as"
include "flash/ui/GameInput.as"
include "flash/ui/KeyLocation.as"
include "flash/ui/KeyboardType.as"
include "flash/ui/MouseCursor.as"
Expand Down

0 comments on commit 9b9c95b

Please sign in to comment.