Skip to content

Commit

Permalink
Add build note. Try sending gamepad keys from view.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugh Sanderson committed Sep 5, 2024
1 parent 6ef76c1 commit c067571
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ haxelib install nme
haxelib run nme setup
```

To run with `NME_LOCAL_TOOLKIT` (the default for android now), update the submodules with:
```
git submodule init
git submodule update
```

To install a specific version

1. Go to [the releases page](https://github.com/haxenme/nme/releases)
Expand Down
2 changes: 1 addition & 1 deletion src/nme/android/Bluetooth.hx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Bluetooth
public function new(inPortName:String, ?baud:Int = 9600, ?setupImmediately:Bool = false)
{
portName = inPortName;
baud = 57600;
//baud = 57600;

handle = create(inPortName);

Expand Down
2 changes: 1 addition & 1 deletion templates/android/java/org/haxe/nme/GameActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class NmeText extends EditText
public boolean mTextUpdateLockout = false;
public boolean mIncrementalText = true;
boolean ignoreTextReset = false;
static boolean consumeGamepadButtons = false;
public static boolean consumeGamepadButtons = false;

public void onCreate(Bundle state)
{
Expand Down
4 changes: 4 additions & 0 deletions templates/android/java/org/haxe/nme/MainView.java
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@ public void run() {
}});
return true;
}
if (sendGamepadKey(inKeyCode,event) && GameActivity.consumeGamepadButtons)
return true;
return super.onKeyDown(inKeyCode, event);
}

Expand All @@ -618,6 +620,8 @@ public void run() {
}});
return true;
}
if (sendGamepadKey(inKeyCode,event) && GameActivity.consumeGamepadButtons)
return true;
return super.onKeyDown(inKeyCode, event);
}

Expand Down

0 comments on commit c067571

Please sign in to comment.