mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-09 16:45:37 -07:00
Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b72e87a89 | ||
|
|
cb9ffc52fb | ||
|
|
5270adf48f |
7 changed files with 9 additions and 4 deletions
Binary file not shown.
|
|
@ -3,6 +3,7 @@ package net.kdt.pojavlaunch;
|
|||
import static net.kdt.pojavlaunch.GLFWGLSurface.FINGER_SCROLL_THRESHOLD;
|
||||
import static net.kdt.pojavlaunch.Tools.currentDisplayMetrics;
|
||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.DEFAULT_PREF;
|
||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_SCALE_FACTOR;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
|
@ -35,7 +36,7 @@ public class Touchpad extends FrameLayout implements GrabListener{
|
|||
/* Detect a classic android Tap */
|
||||
private final GestureDetector mSingleTapDetector = new GestureDetector(getContext(), new SingleTapConfirm());
|
||||
/* Resolution scaler option, allow downsizing a window */
|
||||
private final float mScaleFactor = DEFAULT_PREF.getInt("resolutionRatio",100)/100f;
|
||||
private final float mScaleFactor = PREF_SCALE_FACTOR/100f;
|
||||
/* Current pointer ID to move the mouse */
|
||||
private int mCurrentPointerID = -1000;
|
||||
/* Previous MotionEvent position, not scale */
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ import static net.kdt.pojavlaunch.customcontrols.gamepad.GamepadJoystick.DIRECTI
|
|||
import static net.kdt.pojavlaunch.customcontrols.gamepad.GamepadJoystick.DIRECTION_SOUTH_WEST;
|
||||
import static net.kdt.pojavlaunch.customcontrols.gamepad.GamepadJoystick.DIRECTION_WEST;
|
||||
import static net.kdt.pojavlaunch.customcontrols.gamepad.GamepadJoystick.isJoystickEvent;
|
||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_SCALE_FACTOR;
|
||||
import static net.kdt.pojavlaunch.utils.MCOptionUtils.getMcScale;
|
||||
import static org.lwjgl.glfw.CallbackBridge.sendKeyPress;
|
||||
import static org.lwjgl.glfw.CallbackBridge.sendMouseButton;
|
||||
|
|
@ -51,7 +52,7 @@ import fr.spse.gamepad_remapper.GamepadHandler;
|
|||
public class Gamepad implements GrabListener, GamepadHandler {
|
||||
|
||||
/* Resolution scaler option, allow downsizing a window */
|
||||
private final float mScaleFactor = LauncherPreferences.DEFAULT_PREF.getInt("resolutionRatio",100)/100f;
|
||||
private final float mScaleFactor = PREF_SCALE_FACTOR/100f;
|
||||
|
||||
/* Sensitivity, adjusted according to screen size */
|
||||
private final double mSensitivityFactor = (1.4 * (1080f/ currentDisplayMetrics.heightPixels));
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class LauncherPreferences {
|
|||
public static boolean PREF_ARC_CAPES = false;
|
||||
public static boolean PREF_USE_ALTERNATE_SURFACE = true;
|
||||
public static boolean PREF_JAVA_SANDBOX = true;
|
||||
public static int PREF_SCALE_FACTOR = 100;
|
||||
public static int PREF_SCALE_FACTOR = 60;
|
||||
public static boolean PREF_ENABLE_GYRO = false;
|
||||
public static float PREF_GYRO_SENSITIVITY = 1f;
|
||||
public static int PREF_GYRO_SAMPLE_RATE = 16;
|
||||
|
|
@ -93,7 +93,7 @@ public class LauncherPreferences {
|
|||
PREF_ARC_CAPES = DEFAULT_PREF.getBoolean("arc_capes",false);
|
||||
PREF_USE_ALTERNATE_SURFACE = DEFAULT_PREF.getBoolean("alternate_surface", false);
|
||||
PREF_JAVA_SANDBOX = DEFAULT_PREF.getBoolean("java_sandbox", true);
|
||||
PREF_SCALE_FACTOR = DEFAULT_PREF.getInt("resolutionRatio", 100);
|
||||
PREF_SCALE_FACTOR = DEFAULT_PREF.getInt("resolutionRatio", 60);
|
||||
PREF_ENABLE_GYRO = DEFAULT_PREF.getBoolean("enableGyro", false);
|
||||
PREF_GYRO_SENSITIVITY = ((float)DEFAULT_PREF.getInt("gyroSensitivity", 100))/100f;
|
||||
PREF_GYRO_SAMPLE_RATE = DEFAULT_PREF.getInt("gyroSampleRate", 16);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package net.kdt.pojavlaunch.prefs.screens;
|
||||
|
||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_NOTCH_SIZE;
|
||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_SCALE_FACTOR;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public class KeyEncoder {
|
|||
if (keyCode == BACKSPACE_ANDROID && !TouchCharInput.softKeyboardIsActive) {
|
||||
sendUnicodeBackspace();
|
||||
} else if (specialCharMap.containsKey(c)) {
|
||||
AWTInputBridge.sendKey(MODIFIER, MODIFIER);
|
||||
AWTInputBridge.sendKey(specialCharMap.get(c), specialCharMap.get(c));
|
||||
} else if (Character.isDigit(c)) {
|
||||
AWTInputBridge.sendKey(c, c);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
app2:showSeekBarValue="true"
|
||||
app2:selectable="false"
|
||||
app2:seekBarIncrement="5"
|
||||
app2:defaultValue="60"
|
||||
android:icon="@drawable/ic_setting_screen_resolution"
|
||||
/>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue