Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Show On-Screen Buttons" as a toggle in General Settings #146

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
Added lines 97, 129, 154, 173
  • Loading branch information
JohnTheHammer authored Apr 6, 2024
commit 043a9e7967e4d173a7524a8ef290834b99d44386
4 changes: 4 additions & 0 deletions src/android/java/com/hydra/noods/SettingsMenu.java
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@ protected void onCreate(Bundle savedInstanceState)
editor.putBoolean("screen_filter", (getScreenFilter() == 0) ? false : true);
editor.putBoolean("mic_enable", (getMicEnable() == 0) ? false : true);
editor.putBoolean("show_fps_counter", (getShowFpsCounter() == 0) ? false : true);
editor.putBoolean("show_buttons", (getShowButtons() == 0) ? false : true);
editor.putInt("button_scale", getButtonScale());
editor.putInt("button_spacing", getButtonSpacing());
editor.putInt("vibrate_strength", getVibrateStrength());
@@ -125,6 +126,7 @@ public void onBackPressed()
setScreenFilter(prefs.getBoolean("screen_filter", true) ? 1 : 0);
setMicEnable(prefs.getBoolean("mic_enable", false) ? 1 : 0);
setShowFpsCounter(prefs.getBoolean("show_fps_counter", false) ? 1 : 0);
setShowButtons(prefs.getBoolean("show_buttons", false) ? 1 : 0);
setButtonScale(prefs.getInt("button_scale", 5));
setButtonSpacing(prefs.getInt("button_spacing", 10));
setVibrateStrength(prefs.getInt("vibrate_strength", 1));
@@ -149,6 +151,7 @@ public void onBackPressed()
public static native int getScreenFilter();
public static native int getMicEnable();
public static native int getShowFpsCounter();
public static native int getShowButtons();
public static native int getButtonScale();
public static native int getButtonSpacing();
public static native int getVibrateStrength();
@@ -167,6 +170,7 @@ public void onBackPressed()
public static native void setScreenFilter(int value);
public static native void setMicEnable(int value);
public static native void setShowFpsCounter(int value);
public static native void setShowButtons(int value);
public static native void setButtonScale(int value);
public static native void setButtonSpacing(int value);
public static native void setVibrateStrength(int value);