177 Commits
Author SHA1 Message Date
Duy Tran Khanh 27924ca870 Changes to custom controls
Allow saving to default.json
Put custom controls editor to in-game menu
Localization
2022-12-06 18:27:11 +07:00
Duy Tran Khanh b46cfcfc82 New debug option: auto correction
Sometimes autocorrection can be annoying, so there's now a toggle,
enabled by default to preserve behavior.
2022-12-06 18:21:31 +07:00
Duy Tran Khanh f1da61ef26 New debug option: hide home indicator
This allows home indicator to be hidden again, usually useful for users
who play with external controlling device without having to use Guided
Access.

Changed icon of some settings.
Home indicator, status bar and screen edge lock is now based on side
menu visibility.
2022-11-29 19:17:10 +07:00
Duy Tran Khanh 83a5994881 Fix: duplicate init line in d01d616
Duplicated init caused views to be messed up when safe area is set. This commit removes the duplicated line as a part of the undo commit d01d616.

Also fix some spacing issues
2022-11-26 06:24:13 +07:00
Eilionoir Tunnicliff c5d5ed0bfa Swap LNC + SVC home bar hiding 2022-11-25 11:14:57 -05:00
Eilionoir Tunnicliff d01d616c06 Undo WIP SVC code + fix text in LPVC 2022-11-25 10:31:52 -05:00
Eilionoir Tunnicliff 8fe44a1aea Add alternate Dark icon
Feature request from a whiiiiiiiiiile ago
2022-11-25 10:22:27 -05:00
Duy Tran Khanh 54fd01a7f2 Fix: lost updateSavedResolution in viewWillTransitionToSize
This caused game not to update resolution on window resize.
2022-11-19 11:15:23 +07:00
Duy Tran Khanh 1af09ca02d Tweak NSLocalizedString; Keep split display mode
Tweak NSLocalizedString to return English if not yet localized.
Keep Split display mode between rotations.
New debug option: skip JIT wait, for #423
2022-11-17 21:46:38 +07:00
Duy Tran Khanh 80132a5964 Fix: did not prefer ext pointer lock on hotplug 2022-11-15 21:37:41 +07:00
Duy Tran Khanh 973568eaea Tweak pointer lock, fix inverted scrolling
Fixed these following issues: #420, #421
Replaced commit 3e2d3c9 because it was not complete.
2022-11-14 20:24:46 +07:00
Duy Tran Khanh 838f99af1b Support external display resolution
TODO: add checks to not confuse with Stage Manager + external display

README.md: Added missing credits
2022-11-13 22:01:57 +07:00
Eilionoir Tunnicliff ab5bd8469e Changes
- Removed FAQ, About Launcher, and Update History buttons
- Moved *.png to Assets.xcassets
- Moved LPVC2 to LPVC
2022-11-10 00:03:37 -05:00
Duy Tran Khanh b5af92d0f5 JVM crash dump: now shown, disable some Cr4shed handler
When Cr4shed crash handler is on, chaining to it will eventually crash
instead of returning so that JVM can continue perform dump. For now,
signal handlers are reset to default.

abort() is now caught and shown in the launcher.

Temporarily disabled safe area when windowed, until I can properly set
it up, in order to workaround buttons going out of bounds.
2022-11-03 21:12:55 +07:00
Duy Tran Khanh 8ca77a1b73 Support resizable for iPadOS Stage Manager
On iPadOS, PojavLauncher can be launched in portrait mode
Declare controller support in Info.plist
Sync LWJGL changes from Android repo
2022-10-31 11:13:03 +07:00
Duy Tran Khanh 8218a28e4d For 503aa82: it turns out iOS has stolen inputView
This commit should fix its core issue, so the workaround is removed.
For a while, UITextField variable was named `inputView`, which is same
as the name UIKit used to query custom input view. It was not until
recently that the crash started occurring on my device.
Other fixes (for LogView):
- Line indentation in SurfaceViewController+LogView.m:214
- Navigation bar size: now call sizeToFit
2022-10-19 17:59:18 +07:00
Duy Tran Khanh 8c0b8da9c3 Add menu icons; Error is now shown in fullscreen
JIT check: increase check timeout
2022-10-18 18:27:50 +07:00
Duy Tran Khanh 76ae494557 Split SurfaceViewController.m to separate files
It's slowly getting too big, so I have to split, module-like organized.
- Category LogView (Log output, just added)
- Category Navigation (drawer menu)
- TrackedTextField
2022-10-11 19:54:58 +07:00
Duy Tran Khanh 31fee44bf7 Fixes (mostly for #385) 2022-10-06 20:43:03 +07:00
Duy Tran Khanh b46c64cc59 Changes and fixes to input, mark nonatomic to others
- Controller: implement ticking, swapped thumbstick mapping to match
common usage
- External mouse should continue sending move while mouse button is
being held
- Tweak touch scroll velocity division to 100
2022-10-02 10:54:04 +07:00
Duy Tran Khanh 6c256aa362 Correct swipeable button offset 2022-09-26 05:41:04 +07:00
Duy Tran Khanh f404ddd2cb Add a delay between held state on click 2022-09-17 21:46:26 +07:00
Duy Tran Khanh 77370a01ea Self-controlled Jetsam limit for unsandboxed env 2022-09-16 17:43:53 +07:00
khanhduytran0 d949a3d661 Correct hotbar slot scaling 2022-09-15 21:55:23 +07:00
Duy Tran Khanh 8d26ed38d7 Custom controls: make toggleable functional
Fixes #378
2022-09-10 18:28:09 +07:00
Duy Tran Khanh d42d4e963e Allow changing resolution while in game (1.13+)
For now, this only works properly on Minecraft 1.13+. Older version
doesn't seem to get the new resolution (will be fixed later)

Additional changes:
- Make ingame settings background transparent
- Set prefersHomeIndicatorAutoHidden to YES
2022-09-05 19:38:39 +07:00
khanhduytran0 f27808464b Allow control settings to be changed ingame 2022-09-04 09:47:46 +07:00
Duy Tran Khanh 97c2f4b473 Added controller input (not tested)
This works by mapping gamepad keys to keyboard keys, just like
PojavLauncher Android.
2022-08-28 21:47:25 +07:00
Duy Tran Khanh 10aa3d07e8 Simplify scrollPanGesture handling 2022-08-14 09:12:19 +07:00
Duy Tran Khanh d17728a093 Virtual keyboard: fix Return key not working 2022-08-03 12:33:31 +07:00
Duy Tran Khanh 292fb8166f Custom controls: safe area is now customizable
Other changes:
- Cleanup unused functions
- Internal changes to access ViewController globally
- Moved ControlLayout to a separate file
2022-08-03 12:23:27 +07:00
khanhduytran0 ce292d518a Tweaks
Added UIRequiresFullScreen for iPad
Only force full navigation bar height on iPhone
The Virtual mouse preference can now be set by the toggle button
Use UIColor.whiteColor instead of RGB 255/255
Use arm64e-supported fishhook fork
2022-07-29 13:27:18 +07:00
Duy Tran Khanh 7bbbe2cb54 Cleanup + move tinygl4angle src + use piston-meta 2022-07-28 09:38:15 +07:00
Duy Tran Khanh b880f49b23 Improved text input handling for autocomplete
Text input is now far more stable with keyboard autocompletion and
typing extra stuff (marks).
Improved cursor movement: allows dragging farther.
Additionally, the text field is now made visible on the side menu.
Known issue that still persists: if the trackpad's cursor (by 3D
Touch/spacebar) is moved too fast, it will not synchronize with game

In other side, a bug fix: symlink fails, because the `Application
Support` folder was not created.
2022-07-24 20:56:53 +07:00
Duy Tran Khanh d8459effc0 WIP: New User interface
UISplitViewController is being used to create split menu.
Currently, autolayout is not yet done.
Added account switcher to the split view.

Fixes:
- auth_session parameter for legacy Minecraft versions
- Updating self.view background color is now automated by
UIColor.systemBackgroundColor
2022-07-22 08:02:40 +07:00
khanhduytran0 5d8a136470 SurfaceViewController is now always the root vc
Before launching game, SurfaceViewController is set to UIWindow.rootViewController, making it similar to "Restart before launching" in order to *attempt* to find out why touchscreen input does not work on certain devices. The restart option is still kept for debugging purpose.

Some other tiny code tweaks
2022-07-16 13:27:25 +07:00
Duy Tran Khanh 8aea2ee5fc Changes
Added a little more debug info
Fixes: the GUI button hides itself; Makefile jar path; Restart before
launching game
2022-07-01 12:43:30 +07:00
Duy Tran Khanh ee2c68fb98 Fixes
Makefile: fix path
Moved GameSurfaceView to a separate class
Renamed MinecraftDownloader to MinecraftResourceUtils

Fix: Some versions fails because GLFW_CLIENT_API is not set
2022-07-01 07:02:25 +07:00
Duy Tran Khanh ec8b7dc555 Side menu: some tiny changes 2022-06-16 19:57:13 +07:00
khanhduytran0 582aa18d2c Added right-size menu (incomplete)
Limitations:
- Animations might not work properly
- Only one option is available, more will be added soon
2022-06-15 21:43:54 +07:00
khanhduytran0 97433a5596 Add support for mods that use Vulkan for rendering
Known mods: Blaze4D (untested), VulkanMod, more?
- VulkanMod: needs a tiny modification to get it work with LWJGL 3.2.3
2022-06-10 12:13:23 +07:00
Duy Tran Khanh 5d7c77d697 Forge 1.17+ support 2022-05-29 20:03:04 +07:00
Duy Tran Khanh 85bc35f679 Automatically change the Java version if needed
Manually-specified Java version still applies to:
- Minecraft versions below 1.17 (default is Java 8)
- Minecraft version 1.17.x (allow choosing between Java 16 and 17)
2022-05-27 09:01:39 +07:00
khanhduytran0 bf12743457 Moved the JVM entry point to start when needed 2022-05-27 05:48:25 +07:00
Eilionoir Tunnicliff ab4bddb941 Merge branch origin/main into objc-rewrite 2022-05-22 03:12:48 -04:00
khanhduytran0 2a9d3909f8 Internal, renderer and UI changes + 1.19-pre1 support
Minecraft 1.19 support:
- Since 1.19-pre1, LWJGL 3.3.1 is used. However, LWJGL 3.2.3 still works with it, at least for this Minecraft release.
- Added a hack to skip calling to ObjC codes (skipped an asset file to skip setting the icon)
- JNA version replacing: now only change to 5.8.0 if version < 5.8.0

Internal changes:
- Cleanup: moved global functions to a new place
- Handle demo user correctly: actually authenticate the game with demo's access token and use the Xbox gamertag as the username
- Start moving strings to Localizable.strings (WIP)
- Re-wrote the Microsoft authentication and account management to Objective-C
- Assets downloading: added a tiny sleep call so that the UI won’t be frozen when too many tasks are executed at the same time

Renderers changes
- gl4es: `init_constructor` is now enabled, therefore moved the preload part to before `eglInitialize` (or EGL will be de-init after gl4es's hardware test).
- gl4es-extra (aka holy gl4es 1.1.4) is now used to replace the regular gl4es. This fixes VBO issue on version < 1.13 and some extra stuff. https://github.com/PojavLauncherTeam/gl4es-114-extra/commit/d6cf5c4
- Removed gl4es 1.1.5 and `Disable gl4es shaderconv` as it's unnecessary for now
- Removed vgpu, as it requires some missing extensions when come to shaders

User interface:
- The account selection list now displays the skin head (or the Xbox gamerpic if demo) and the account type
2022-05-22 11:31:14 +07:00
Eilionoir Tunnicliff 53613c5f18 Updates
- New wordmark on the main screen
- Remove wordmark from LaunchScreen.storyboard
- Apply depiction and icon fixes from 2.0.1
2022-04-30 19:43:24 -04:00
Duy Tran Khanh 580da57855 Set GLFW window attrib; Proper external mouse lock
Setting window attribute fixes DynamicFPS mod being broken
2022-03-17 07:24:41 +07:00
Duy Tran Khanh 5c618d907b CC: passthrough support; Lock mouse pointer
Custom controls button passthrough: currently, only passed-through
events are touch events.
Pointer locking is incomplete and might not work properly.
2022-03-03 08:16:14 +07:00
khanhduytran0 147ac079be Fixes virtual mouse, XVA entitlement (iOS 14)
Fixes virtual mouse not working when enabled from Preferences.
Added Extended Virtual Addressing Entitlement.
2022-02-25 06:58:07 +07:00