mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
lineage: the pad bridge's hat and Quick Access chord lines, and the audio component's context, on the new names
This commit is contained in:
1 parent
ab8b06bacd
commit
3afad00a84
2 files changed
+9
-9
No files matched your search
@@ -86,7 +86,7 @@ public class PulseAudioComponent extends SessionPart {
|
|||||||
|| have == null || !BUNDLE_STAMP.equals(have.trim())) {
|
|| have == null || !BUNDLE_STAMP.equals(have.trim())) {
|
||||||
Log.i(TAG, "unpacking pulseaudio.tzst (" + BUNDLE_STAMP + "; had " + have + ")");
|
Log.i(TAG, "unpacking pulseaudio.tzst (" + BUNDLE_STAMP + "; had " + have + ")");
|
||||||
FileUtils.delete(modulesDir);
|
FileUtils.delete(modulesDir);
|
||||||
if (TarZst.extractAsset(context, "pulseaudio.tzst", workingDir)) {
|
if (TarZst.extractAsset(app(), "pulseaudio.tzst", workingDir)) {
|
||||||
FileUtils.writeString(stamp, BUNDLE_STAMP);
|
FileUtils.writeString(stamp, BUNDLE_STAMP);
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "pulseaudio.tzst did not unpack");
|
Log.e(TAG, "pulseaudio.tzst did not unpack");
|
||||||
|
|||||||
@@ -139,10 +139,10 @@ public final class PadBridge {
|
|||||||
state.rightTrigger = rt;
|
state.rightTrigger = rt;
|
||||||
float hatX = event.getAxisValue(MotionEvent.AXIS_HAT_X);
|
float hatX = event.getAxisValue(MotionEvent.AXIS_HAT_X);
|
||||||
float hatY = event.getAxisValue(MotionEvent.AXIS_HAT_Y);
|
float hatY = event.getAxisValue(MotionEvent.AXIS_HAT_Y);
|
||||||
state.dpad[0] = hatY < -0.5f;
|
state.up = hatY < -0.5f;
|
||||||
state.dpad[1] = hatX > 0.5f;
|
state.right = hatX > 0.5f;
|
||||||
state.dpad[2] = hatY > 0.5f;
|
state.down = hatY > 0.5f;
|
||||||
state.dpad[3] = hatX < -0.5f;
|
state.left = hatX < -0.5f;
|
||||||
publish();
|
publish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -202,12 +202,12 @@ public final class PadBridge {
|
|||||||
private void publish() {
|
private void publish() {
|
||||||
if (!open && !start()) return;
|
if (!open && !start()) return;
|
||||||
if (systemGuidePressed || qamChordActive) {
|
if (systemGuidePressed || qamChordActive) {
|
||||||
effectiveState.copy(state);
|
effectiveState.copyFrom(state);
|
||||||
effectiveState.setPressed(PadState.IDX_BUTTON_MODE, true);
|
effectiveState.press(PadState.GUIDE, true);
|
||||||
if (qamSyntheticAPressed) {
|
if (qamSyntheticAPressed) {
|
||||||
effectiveState.setPressed(0, state.isPressed(0) || qamSyntheticAPressed);
|
effectiveState.press(PadState.A, state.isDown(PadState.A) || qamSyntheticAPressed);
|
||||||
}
|
}
|
||||||
writer.writePadState(effectiveState);
|
writer.writePad(effectiveState);
|
||||||
} else {
|
} else {
|
||||||
writer.writePad(state);
|
writer.writePad(state);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user