Skip to content

Commit

Permalink
Update Jar to e8589 (Music + WorldMap), Set default resolution scale
Browse files Browse the repository at this point in the history
  • Loading branch information
downthecrop committed Jun 9, 2024
1 parent 9df7163 commit cb9ffc5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 4 deletions.
Binary file not shown.
Binary file modified app_pojavlauncher/src/main/assets/rt4.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
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;
Expand Down Expand Up @@ -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 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
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;
Expand All @@ -51,7 +52,7 @@
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -93,7 +93,7 @@ public static void loadPreferences(Context ctx) {
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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions app_pojavlauncher/src/main/res/xml/pref_video.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
app2:showSeekBarValue="true"
app2:selectable="false"
app2:seekBarIncrement="5"
app2:defaultValue="60"
android:icon="@drawable/ic_setting_screen_resolution"
/>

Expand Down

0 comments on commit cb9ffc5

Please sign in to comment.