116 Commits
Author SHA1 Message Date
Duy Tran Khanh bcfc13a4f1 Major cleanup for the controller config vc
- Cleanup unused parts
- Cleanup complicated dictionary constructions
- Fix lag spikes during scrolling in this screen

Allow audio settings to be changed ingame
2023-04-19 19:12:32 +07:00
Eilionoir Tunnicliff 43123158a4 (WIP) Enable usage of JREs in Documents/
If there is no java_runtimes/ folder in the bundle, PojavLauncher will look for runtimes in Documents/jvm. Not currently working with my tests as this isn't the code I used before.
Also changes the slimmed ipas to not include any runtimes at all.
2023-03-27 09:41:19 -04:00
Duy Tran Khanh ac22507085 another fix for the last commit because iforgor 2023-03-25 20:16:09 +07:00
Duy Tran Khanh 7668f3cb9a Fix: audio output issues due to misplaced pref key
Issue introduced in 8d4a223257
2023-03-25 20:13:35 +07:00
Eilionoir Tunnicliff 8646bc779d Me when we don't need this anymore 2023-03-23 22:09:49 -04:00
Eilionoir Tunnicliff 8d4a223257 Add switch for customizing AVAudioSession (untested) 2023-03-23 21:50:57 -04:00
Eilionoir Tunnicliff 62d7bfe425 Remove support for external JREs
Users can use the built-in JREs for PojavLauncher, and (if I can manage to make it work easily) JREs in the Documents directory
2023-03-23 10:21:13 -04:00
Duy Tran Khanh cf2ea1f478 Fix: regression in custom_env parser ignoring lines after comment 2023-03-03 21:49:35 +07:00
Duy Tran Khanh c431f9eb6f Fix #512: move spiral gamedir properties 2023-02-24 04:56:57 +07:00
Duy Tran Khanh be528eb08a Fix #511: fixes for Spiral Knights 2023-02-23 18:17:26 +07:00
Duy Tran Khanh aa4bbc90c6 Workaround: set back AVAudioSessionCategoryPlayback
Because microphone input is not currently working, audio session category is set back to its previous value to fix low volume issue.
2023-02-20 21:09:04 +07:00
Duy Tran Khanh 4e2a62d24b Move strings to InfoPlist.strings, change AVAudioSession category
Change AVAudioSession category to AVAudioSessionCategoryPlayAndRecord
2023-01-30 08:40:27 +07:00
Eilionoir Tunnicliff 7cb7578c17 Remove java-16-openjdk from environmentFailsafes()
Versions that use 16 can use 17 as well. Instead of wasting storage and installing both, use just 17 instead.
2023-01-26 09:45:55 -05:00
Duy Tran Khanh fcc7d8b2d4 Fix(iOS 12): fatal issues: dlopen, entitlement
* dlopening the main executable fails
* dlopening dylib fails due to codesign
* Installing PojavLauncher with AppSync causing
extended-virtual-addressing entitlement to be checked improperly

Current issue: it seems that Java 8 is broken on iOS 12
2023-01-20 21:42:51 +07:00
khanhduytran0 b0203d6fc7 Text input for jar launcher, update lib, fixes
News
- Added text input support for jar launcher.
- Updated MoltenVK to https://github.com/KhronosGroup/MoltenVK/commit/d880f4c

Internal changes
- Added more handling cases to avoid missing call to pojav_initOpenGL()
- Moved custom control’s global functions and properties to ControlLayout.
- Moved dylib framework outside its folder, as it’s not necessary to be bundled in framework.
- Reusing custom controls to produce flexible buttons in jar launcher, which might be extended in the future.

Fixes
- Multistage text input (Japanese, Chinese, etc) should now work again.
- Pointer lock should now function properly again.

- Updated README.md to reflect current stuff
2023-01-19 09:54:55 +07:00
Eilionoir Tunnicliff 92ff02a1ad Fix delegate set issue
Using code from an old project and forgor 💀
2023-01-16 19:34:37 -05:00
Eilionoir Tunnicliff 6013bf8a2a Change AVAudioSession category + options
This allows PojavLauncher to mix its audio with other applications.
Playback was chosen so that audio is not disabled with the ringer
switch - toggle to be added later.

Code untested - might break/not compile.
2023-01-16 19:32:01 -05:00
Duy Tran Khanh 495e8cb9d0 Fix: Timezone is now set properly 2023-01-15 05:12:10 +07:00
Duy Tran Khanh 652316e8f6 Various fixes and enhancements
- Change setNeedsUpdateOfPrefersPointerLocked logic to hopefully fix
issues with mouse not recognizing on iPhones
- Change reloadVersionList logic to load Installed version list
instantly at startup
- Enable game's CALayer opaque and drawsAsynchronously to improve
rendering performance
- Handle natives_directory variable for legacy modded versions
- Set LD_LIBRARY_PATH to silent Caciocavallo NPE error in locating
Android-only code
- Tapping Play when no version selected will now bring up the version
picker instead of doing nothing
2023-01-13 20:11:50 +07:00
Duy Tran Khanh 30e0529658 Internal fixes 2022-12-30 06:06:35 +07:00
Eilionoir Tunnicliff 37b479bbe1 Fix warnings, drop 1GB devices 2022-12-18 13:40:51 -05:00
Duy Tran Khanh d0279af8aa Internal changes
- First changes for tvOS (very WIP) this will be a challenge to use
remote storage as ATV doesn't allow persistent storage (at least
without jailbreak). Low priority for now.
- Change regLog, debugLog to NSLog, NSDebugLog
- Rewrite most of JavaLauncher.m to ObjC
- Update README.md
2022-12-17 21:25:23 +07:00
Duy Tran Khanh 5eae6015d6 Rearranged UI layout
* Moved account selection to the secondary NavigationController
* Added logo to fill in the primary one
* Moved buttons to the sidebar:
- Custom controls
- Install jar
- Send logs
* Fixed object memory leakage in LauncherNavigationController
* Set fullscreen=false on startup, workaround < 1.13 resizing issue
* Reduced mouse_pointer size

TODOs:
* Add icons for new items, will prefer copying from the Android
version.
* Remove LoginViewController: integrate add account to the account
selector, move Techno text+check to sidebar, etc..
* Instead of separate Microsoft, Demo login; display demo warning
before MS login.
2022-11-21 22:03:59 +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 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 9aa7095ca1 Auto RAM tweaks
- It is now accessible for everyone (sandboxed, TrollStored, jailbroken)
- Enabled by default if Jetsam can't be controlled
- Default ratio: 25% (sandboxed), 40% (TrollStored or jailbroken)
2022-09-16 21:29:12 +07:00
Duy Tran Khanh d5540fd4a5 Correct Cosmetica preference key 2022-09-14 05:50:47 +07:00
Duy Tran Khanh 56f4ec73e9 Jailbroken, Java 8, IPA: fix check of libawt_xawt 2022-09-12 21:12:36 +07:00
khanhduytran0 c10e0af8ff Various fixes, some cleanup
Fixes:
- dlopen gets hooked no matter if installed in /Applications or container
- Jailbroken IPA installation always looked for /usr/lib/jvm instead of the internal one
- Metal returned 0 physical devices, caused all renderers to be broken
- Zink renderer tried to load VirGL stuff
2022-09-11 21:58:11 +07:00
Duy Tran Khanh e372df28dc Welcome to the new Settings UI
What's new?
- Settings are now categorized
- Re-designed Game Directory manager
- Moved help detail to subtitles, toggleable
- Some settings are now made accessible ingame
- Added Auto Renderer

Removed settings:
- Restart before launching: not needed anymore, also it would break JIT/debugger.
2022-09-09 19:08:27 +07:00
Duy Tran Khanh f26849f5f2 iOS 16(?), Java 8: disable compressed class space 2022-09-09 10:58:29 +07:00
Duy Tran Khanh 83c54845b8 Get more settings to function 2022-09-02 15:45:18 +07:00
Duy Tran Khanh b23678692a Merge commit 'e1bd237d69f7ad95b0fa01c629a62f5880cf9943'
Conflicts:
	.github/workflows/development.yml
	.github/workflows/release.yml
	Makefile
	Natives/main.m
2022-08-30 17:02:07 +07:00
Duy Tran Khanh 0783f2d43a Java 8: Fix awt_xawt and Caciocavallo 2022-08-25 07:14:31 +07:00
Duy Tran Khanh b7cc2d097e Added Caciocavallo17; Get JRE build from Actions 2022-08-24 12:34:06 +07:00
Eilionoir Tunnicliff 43de973bcc Only allocate memory when required
Attempts to fix issues where the JVM will crash due to memory restrictions
2022-08-19 16:16:10 -04:00
Duy Tran Khanh 9a5cee04c6 wip auto renderer 2022-08-18 08:09:46 +07:00
Duy Tran Khanh 028f2535e8 ipa build: added java 17 2022-08-17 20:45:45 +07:00
Duy Tran Khanh da75d569b1 Perform some entitlement checks 2022-08-15 18:22:00 +07:00
Duy Tran Khanh 57031041e2 MinecraftResourceUtils.m: fix unexpected states
Fix: could not find inhertisFrom, launch even when download fails.

Other changes: log shown dialog, fix compile warning
2022-08-12 19:27:01 +07:00
Duy Tran Khanh 44408a05af Update JavaLauncher.m 2022-08-12 12:14:37 +07:00
Duy Tran Khanh 1592d50f65 Attempt to unlock 120Hz for ProMotion display 2022-08-12 12:09:41 +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
Duy Tran Khanh ad9c6d482a Allow embedding JREs to PojavLauncher.app/jvm for IPA builds
The old IPA creation process: wrap every dylib files into framework;
this appears to be unnecessary, dylib files can be put outside without
breaking codesigning and validation (only tested with AltStore: it
scans and signs every Mach-O files).
Therefore, IPA builds now allow putting Java Runtimes to
`PojavLauncher.app/jvm`.
Makefile is yet tweaked to adapt this change, will be done later.

Other tweaks
- Disabled autocorrection for text fields in preferences
- The preferences now searches for installed JRE versions instead of
hardcoding them
- Bug fix: "accounts" folder was not created initially, leading to
"username.json does not exist" error
2022-07-25 20:54:41 +07:00
Duy Tran Khanh 47c8874cae Bug fix: UI completely freezes on launch
The root cause is that the JVM has taken away the main thread, caused the UIKit’s queue to stop. This env var exists in my dev environment but has never been added here.
2022-07-23 21:54:48 +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 a282074914 Handle ingame opening folder/link 2022-06-07 05:56:18 +07:00
Duy Tran Khanh 5d7c77d697 Forge 1.17+ support 2022-05-29 20:03:04 +07:00
Duy Tran Khanh 7337d90eee All options are now applied without restarting
Instances manager: cleanup, now explicitly state the error message
Moved init_loadCustomEnv() back to JavaLauncher.m
2022-05-27 09:56:06 +07:00