22 Commits
Author SHA1 Message Date
khanhduytran0 bc36365994 Fix: replace all currentWindow() with static variable 2024-08-16 09:51:34 +07:00
Duy Tran Khanh b9d6e14015 Fix[gyro]: invert axis on upside down orientations
This commit fixes #570

Also fix gyro factor to match 1:1 ratio like the comment
2023-07-06 18:36:49 +07:00
khanhduytran0 6cf61e62c0 Feats: preference isolation & profile management
- Rewrote LauncherPreferences -> PLPreferences
 + Now the file layout is the same as UI layout
 + (get/set)Preference are replaced with corresponding get/set types + Getting/setting is now done through keyPath instead of manually iterating over subdictionaries.
 + Implemented an isolation layer, allowing an instance to have its own settings. This is off by default

- Implemented launcher_profiles
 + Added Profile manager that can be accessed from the sidebar
 + Moved "Game directory (instances)" to this screen
 + Replaced version selector with profile selector. Version selector is moved into profile editor.

- Other changes
 + Cleanup code by using NSPredicate instead of huge for loops
 + Titles in settings are made multilined
 + Controller config: replaced bar button items with localized ones

Due to how large the changes are, this is committed directly to the mainline branch. Bugs are expected to be found (although I did enough tests for this locally)
2023-07-06 13:59:07 +07:00
Eilionoir Tunnicliff dc22673b06 Remove iOS 12/13 supporting code + Alderis
PojavLauncher 3.0 will require heavy modifications in order to work on those two iOS versions now.
2023-05-08 11:15:52 -04:00
Eilionoir Tunnicliff bcdcc080fb Controller configurator!
Same keycode names as the on-screen editor to make it easier to identify the possible values. Xbox and PlayStation button names for familiarity. Saving configs handled by the Save and Exit buttons on the navigation bar.

Currently known issues:
- may be jumpy when cells reload or load onto the screen
- loading a new configuration file does not update the value of the cells
- loading a new configuration file does not update the "Controller configurator" item in the main Settings window
	- both of these are solved by closing and reopening the view controller for now
2023-03-21 10:52:16 -04:00
Eilionoir Tunnicliff f4ad12cc18 Update ControllerInput.m 2023-03-17 00:43:34 -04:00
Eilionoir Tunnicliff d8c2c68237 Changes
- Move controller init code to a file for the controller configurator code I'm working on locally
- Add option to limit framerate to 60FPS on ProMotion-enabled displays
2023-03-16 02:47:03 -04:00
Duy Tran Khanh 35802571f4 FIx(GyroInput): camera jumps + (WIP)orientation
Use DeviceMotion (gyroscope + accelerometer) instead of Gyro for less
jittering
FIXME: camera jumps upon rotating screen while gyro is active
2023-02-05 17:47:06 +07:00
Duy Tran Khanh 54c2564c2f Feature: gyroscope controls 2023-02-05 12:16:46 +07:00
Duy Tran Khanh 9f2f6d93dd Fix(ControllerInput): joystick magnitude calculation 2023-01-24 06:25:55 +07:00
Duy Tran Khanh 351473ae91 Tweaks to input
CallbackBridge: Properly handle key modifiers being passed to MC;
removed unused functions
KeyboardInput: replaced NSDictionary with C Array for faster access
2022-11-24 22:08:36 +07:00
Duy Tran Khanh 4c502ccec3 ControllerInput: correct scrolling 2022-11-01 06:14:26 +07:00
Duy Tran Khanh 02a835685d Fixes #406: L1, R1 cause double slot switching 2022-10-18 18:17:32 +07:00
Duy Tran Khanh 4bc676e4fa ControllerInput: correct LThumb degree calculation 2022-10-17 07:35:18 +07:00
Duy Tran Khanh db7117e407 ControllerInput: Properly handle left joystick directions 2022-10-16 17:42:16 +07:00
Duy Tran Khanh d6d6f7b989 Bug fix #397: ControllerInput mapping issue
Because GLFW_GAMEPAD_AXIS_LR_TRIGGER have the same constant values as
GLFW_GAMEPAD_BUTTON_LR_BUMPER, both get overriden to left/right mouse
button.

This commit also corrects Back, Start button mapping: tried to write
mapping to a wrong+uninitialized NSDictionary
2022-10-15 10:04:26 +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 ec575fb8c4 Properly handled gamepad joystick (untested) 2022-09-25 11:00:05 +07:00
khanhduytran0 f27808464b Allow control settings to be changed ingame 2022-09-04 09:47:46 +07:00
Duy Tran Khanh a7e6022452 Correct trigger buttons keycodes 2022-08-28 21:51:57 +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