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

Merge zink #1

Merged
merged 37 commits into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
67a3cc5
feat(control): allow subbuttons of free orientation drawer change size
DreamOneX Aug 2, 2023
9f7a580
chore(control): bumb up the version number of control schema
DreamOneX Aug 2, 2023
6279649
Fix[glfw]: add missing function for 23w31a
khanhduytran0 Aug 3, 2023
8a70c6f
fix(control): not allowed to open the control file of version 5
DreamOneX Aug 3, 2023
aed6c00
Feat[controls]: Input joystick
Mathias-Boulay May 15, 2023
58a29ee
Feat[controls]: Add conditional visibility
Mathias-Boulay May 15, 2023
9829dc4
Workaround[controls]: disable view clipping in game
Mathias-Boulay May 15, 2023
7b02277
Tweak[controls]: Less deadzone, use new injections
Mathias-Boulay May 15, 2023
f0e9f84
Fix[controls]: joystick sprint on lock
Mathias-Boulay May 15, 2023
3e9c4b1
Fix[control]: Hide size/visibility editor on subButtons
Mathias-Boulay May 15, 2023
efca2c9
Style[controls]: better spacing
Mathias-Boulay May 15, 2023
fd5f46f
Syle[control]: use consistent mapping dropdown
Mathias-Boulay May 16, 2023
b4a3e18
Feat[controls]: Decouple stroke width from button size
Mathias-Boulay May 16, 2023
6e19430
Fix[controls]: incorrect activated overlay on rounded controls
Mathias-Boulay May 18, 2023
dc7e985
Fix[physical-controls]: Send mouse position more often
Mathias-Boulay Jun 10, 2023
abd7c5b
Tweak[control-editor]: Use standarised paddings
Mathias-Boulay Jul 23, 2023
e2c45b9
Fix[gamepad]: Add right trigger axis
Mathias-Boulay Jul 24, 2023
35208fd
Refactor: Remove need of the oob canvas
Mathias-Boulay Aug 3, 2023
94bfdd7
Chore[controls]: bump up control version
Mathias-Boulay Aug 3, 2023
45e062e
Chore[controls]: bump up layout converter trigger
Mathias-Boulay Aug 3, 2023
26328a2
Change keycode spinner placement
invalid-email-address Aug 3, 2023
f40b5a0
Fix[ui]: remove internal padding
Mathias-Boulay Aug 3, 2023
3535c3d
Fix[joystick]: invisible forward lock
Mathias-Boulay Aug 3, 2023
ea2d10a
Doc[input]: Explain why the input is sent early
Mathias-Boulay Aug 4, 2023
876c97f
Fix[drawer]: sync when hiding the button
Mathias-Boulay Aug 4, 2023
3729230
Fix[controls]: sub button visibility lifecycle
Mathias-Boulay Aug 4, 2023
85f35cc
Feat[joystick]: kdefault to disable forward lock, better lock display
Mathias-Boulay Aug 4, 2023
57ae06a
Fix[profile-editor]: Spinner height aligned with the rest, better sel…
Mathias-Boulay Aug 5, 2023
f945744
Fix[UI]: proper size on landscape
Mathias-Boulay Aug 5, 2023
462baab
Fix[profile]: text accessibility
Mathias-Boulay Aug 5, 2023
4d8f3da
Tweak[editor]: reduce timings for the editor to appear
Mathias-Boulay Aug 5, 2023
73608f2
Fix[controls-editor]: Avoid spanning too high on tablets
Mathias-Boulay Aug 6, 2023
54e98ec
Fix[control-editor]: Manual size on free sub-buttons
Mathias-Boulay Aug 6, 2023
78737cf
Fix[control]: GUI button showing buttons that shouldn't be visible
Mathias-Boulay Aug 6, 2023
4a8c1e4
Feat[LWJGL]: update to 3.3.1 (#4326)
khanhduytran0 Aug 12, 2023
2b879e8
Perf: remove shadow pass on buttons
Mathias-Boulay Aug 9, 2023
0a5d3b3
Merge branch 'zink' into v3_zink_updated
SolDev69 Aug 13, 2023
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
1 change: 1 addition & 0 deletions app_pojavlauncher/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ dependencies {
implementation 'com.github.PojavLauncherTeam:portrait-ssp:6c02fd739b'
implementation 'com.github.Mathias-Boulay:ExtendedView:1.0.0'
implementation 'com.github.Mathias-Boulay:android_gamepad_remapper:eb92e3a5bb'
implementation 'com.github.Mathias-Boulay:virtual-joystick-android:cb7bf45ba5'


// implementation 'com.intuit.sdp:sdp-android:1.0.5'
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1689180036097
1687078018167
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import net.kdt.pojavlaunch.customcontrols.ControlData;
import net.kdt.pojavlaunch.customcontrols.ControlDrawerData;
import net.kdt.pojavlaunch.customcontrols.ControlJoystickData;
import net.kdt.pojavlaunch.customcontrols.ControlLayout;
import net.kdt.pojavlaunch.customcontrols.EditorExitable;
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
Expand Down Expand Up @@ -43,11 +44,11 @@ protected void onCreate(Bundle savedInstanceState) {
switch(position) {
case 0: mControlLayout.addControlButton(new ControlData("New")); break;
case 1: mControlLayout.addDrawer(new ControlDrawerData()); break;
//case 2: mControlLayout.addJoystickButton(new ControlData()); break;
case 2: mControlLayout.openLoadDialog(); break;
case 3: mControlLayout.openSaveDialog(this); break;
case 4: mControlLayout.openSetDefaultDialog(); break;
case 5: // Saving the currently shown control
case 2: mControlLayout.addJoystickButton(new ControlJoystickData()); break;
case 3: mControlLayout.openLoadDialog(); break;
case 4: mControlLayout.openSaveDialog(this); break;
case 5: mControlLayout.openSetDefaultDialog(); break;
case 6: // Saving the currently shown control
try {
Uri contentUri = DocumentsContract.buildDocumentUri(getString(R.string.storageProviderAuthorities), mControlLayout.saveToDirectory(mControlLayout.mLayoutFileName));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static class Version extends FileProperties {
public static class JavaVersionInfo {
public String component;
public int majorVersion;
public int version; // parameter used by LabyMod 4
}
@Keep
public static class LoggingConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,11 @@ public boolean dispatchCapturedPointerEvent(MotionEvent e) {
CallbackBridge.mouseX += (e.getX()* mScaleFactor);
CallbackBridge.mouseY += (e.getY()* mScaleFactor);

// Position is updated by many events, hence it is send regardless of the event value
CallbackBridge.sendCursorPos(CallbackBridge.mouseX, CallbackBridge.mouseY);

switch (e.getActionMasked()) {
case MotionEvent.ACTION_MOVE:
CallbackBridge.sendCursorPos(CallbackBridge.mouseX, CallbackBridge.mouseY);
return true;
case MotionEvent.ACTION_BUTTON_PRESS:
return sendMouseButtonUnconverted(e.getActionButton(), true);
Expand Down
39 changes: 37 additions & 2 deletions app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,34 @@ private static boolean checkRules(JMinecraftVersionList.Arguments.ArgValue.ArgRu
}
return true; // allow if none match
}

private static void preProcessLibraries(DependentLibrary[] libraries) {
for (int i = 0; i < libraries.length; i++) {
DependentLibrary libItem = libraries[i];
String[] version = libItem.name.split(":")[2].split("\\.");
if (libItem.name.startsWith("net.java.dev.jna:jna:")) {
// Special handling for LabyMod 1.8.9, Forge 1.12.2(?) and oshi
// we have libjnidispatch 5.13.0 in jniLibs directory
if (Integer.parseInt(version[0]) >= 5 && Integer.parseInt(version[1]) >= 13) return;
Log.d(APP_NAME, "Library " + libItem.name + " has been changed to version 5.13.0");
libItem.name = "net.java.dev.jna:jna:5.13.0";
libItem.downloads.artifact.path = "net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar";
libItem.downloads.artifact.sha1 = "1200e7ebeedbe0d10062093f32925a912020e747";
libItem.downloads.artifact.url = "https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar";
} else if (libItem.name.startsWith("com.github.oshi:oshi-core:")) {
//if (Integer.parseInt(version[0]) >= 6 && Integer.parseInt(version[1]) >= 3) return;
// FIXME: ensure compatibility

if (Integer.parseInt(version[0]) != 6 || Integer.parseInt(version[1]) != 2) return;
Log.d(APP_NAME, "Library " + libItem.name + " has been changed to version 6.3.0");
libItem.name = "com.github.oshi:oshi-core:6.3.0";
libItem.downloads.artifact.path = "com/github/oshi/oshi-core/6.3.0/oshi-core-6.3.0.jar";
libItem.downloads.artifact.sha1 = "9e98cf55be371cafdb9c70c35d04ec2a8c2b42ac";
libItem.downloads.artifact.url = "https://repo1.maven.org/maven2/com/github/oshi/oshi-core/6.3.0/oshi-core-6.3.0.jar";
}
}
}

public static String[] generateLibClasspath(JMinecraftVersionList.Version info) {
List<String> libDir = new ArrayList<>();
for (DependentLibrary libItem: info.libraries) {
Expand All @@ -636,7 +664,7 @@ public static JMinecraftVersionList.Version getVersionInfo(String versionName, b
try {
JMinecraftVersionList.Version customVer = Tools.GLOBAL_GSON.fromJson(read(DIR_HOME_VERSION + "/" + versionName + "/" + versionName + ".json"), JMinecraftVersionList.Version.class);
if (skipInheriting || customVer.inheritsFrom == null || customVer.inheritsFrom.equals(customVer.id)) {
return customVer;
preProcessLibraries(customVer.libraries);
} else {
JMinecraftVersionList.Version inheritsVer;
//If it won't download, just search for it
Expand Down Expand Up @@ -674,6 +702,7 @@ public static JMinecraftVersionList.Version getVersionInfo(String versionName, b
}
} finally {
inheritsVer.libraries = libList.toArray(new DependentLibrary[0]);
preProcessLibraries(inheritsVer.libraries);
}

// Inheriting Minecraft 1.13+ with append custom args
Expand Down Expand Up @@ -711,8 +740,14 @@ public static JMinecraftVersionList.Version getVersionInfo(String versionName, b
inheritsVer.arguments.game = totalArgList.toArray(new Object[0]);
}

return inheritsVer;
customVer = inheritsVer;
}

// LabyMod 4 sets version instead of majorVersion
if (customVer.javaVersion.majorVersion == 0) {
customVer.javaVersion.majorVersion = customVer.javaVersion.version;
}
return customVer;
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down
Loading
Loading