mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
Cleanup BaseMainActivity
This commit is contained in:
parent
3dd0e0331b
commit
81018bf517
@ -1,6 +1,7 @@
|
|||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.Architecture.ARCH_X86;
|
import static net.kdt.pojavlaunch.Architecture.ARCH_X86;
|
||||||
|
import static net.kdt.pojavlaunch.Tools.currentDisplayMetrics;
|
||||||
|
|
||||||
import static org.lwjgl.glfw.CallbackBridge.windowHeight;
|
import static org.lwjgl.glfw.CallbackBridge.windowHeight;
|
||||||
import static org.lwjgl.glfw.CallbackBridge.windowWidth;
|
import static org.lwjgl.glfw.CallbackBridge.windowWidth;
|
||||||
@ -37,21 +38,14 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
|
|
||||||
private Gamepad gamepad;
|
private Gamepad gamepad;
|
||||||
|
|
||||||
private DisplayMetrics displayMetrics;
|
|
||||||
public float scaleFactor = 1;
|
public float scaleFactor = 1;
|
||||||
public double sensitivityFactor;
|
public double sensitivityFactor;
|
||||||
|
|
||||||
private boolean mIsResuming = false;
|
private boolean mIsResuming = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private MinecraftGLView minecraftGLView;
|
private MinecraftGLView minecraftGLView;
|
||||||
private int guiScale;
|
|
||||||
|
|
||||||
|
|
||||||
private static boolean isVirtualMouseEnabled;
|
|
||||||
private static Touchpad touchpad;
|
private static Touchpad touchpad;
|
||||||
private ImageView mousePointer;
|
|
||||||
private MinecraftAccount mProfile;
|
private MinecraftAccount mProfile;
|
||||||
|
|
||||||
private DrawerLayout drawerLayout;
|
private DrawerLayout drawerLayout;
|
||||||
@ -72,7 +66,6 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
private PrintStream logStream;
|
private PrintStream logStream;
|
||||||
private PerVersionConfig.VersionConfig config;
|
private PerVersionConfig.VersionConfig config;
|
||||||
private final boolean lastEnabled = false;
|
private final boolean lastEnabled = false;
|
||||||
private boolean lastGrab = false;
|
|
||||||
private final boolean isExited = false;
|
private final boolean isExited = false;
|
||||||
private boolean isLogAllow = false;
|
private boolean isLogAllow = false;
|
||||||
|
|
||||||
@ -118,10 +111,10 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
// Minecraft 1.13+
|
// Minecraft 1.13+
|
||||||
isInputStackCall = mVersionInfo.arguments != null;
|
isInputStackCall = mVersionInfo.arguments != null;
|
||||||
|
|
||||||
displayMetrics = Tools.getDisplayMetrics(this);
|
Tools.getDisplayMetrics(this);
|
||||||
sensitivityFactor = 1.4 * (1080f/ displayMetrics.heightPixels);
|
sensitivityFactor = 1.4 * (1080f/ currentDisplayMetrics.heightPixels);
|
||||||
windowWidth = Tools.getDisplayFriendlyRes(displayMetrics.widthPixels, scaleFactor);
|
windowWidth = Tools.getDisplayFriendlyRes(currentDisplayMetrics.widthPixels, scaleFactor);
|
||||||
windowHeight = Tools.getDisplayFriendlyRes(displayMetrics.heightPixels, scaleFactor);
|
windowHeight = Tools.getDisplayFriendlyRes(currentDisplayMetrics.heightPixels, scaleFactor);
|
||||||
System.out.println("WidthHeight: " + windowWidth + ":" + windowHeight);
|
System.out.println("WidthHeight: " + windowWidth + ":" + windowHeight);
|
||||||
|
|
||||||
|
|
||||||
@ -521,13 +514,6 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
drawerLayout.openDrawer(Gravity.RIGHT);
|
drawerLayout.openDrawer(Gravity.RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void placeMouseAdd(float x, float y) {
|
|
||||||
this.mousePointer.setX(mousePointer.getX() + x);
|
|
||||||
this.mousePointer.setY(mousePointer.getY() + y);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void toggleMouse(Context ctx) {
|
public static void toggleMouse(Context ctx) {
|
||||||
if (CallbackBridge.isGrabbing()) return;
|
if (CallbackBridge.isGrabbing()) return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user