Commit Graph

351 Commits

Author SHA1 Message Date
PabloG02
44cbf26b72 Add search functionality to settings
Multiple terms search is also available by separating individual terms with commas.
2023-03-25 22:54:27 +00:00
lynxnb
ab553c9671 Use MD3 divider in ControllerActivity 2023-03-22 21:57:50 +01:00
lynxnb
236b754559 Implement Material You theming support
Material You is disabled by default, it can be toggled in settings.
2023-03-22 21:57:50 +01:00
lynxnb
d3d22670f9 Use MaterialAlertDialogBuilder in PreferenceDialogFragments
`PreferenceDialogFragment`s have been extended to use `MaterialAlertDialogBuilder`, which results in Material Design 3 dialogs. `DialogFragment` creation logic has been moved to `SettingsActivity` to reduce code duplication.
2023-03-22 21:57:50 +01:00
lynxnb
a4a5bedeea Remove icon padding from the left side of preferences
`ProfilePicturePreference` image preview has been moved to the right side as a result.
2023-03-22 21:57:50 +01:00
lynxnb
b12a2bdc3e Replace preference checkboxes with material switches 2023-03-22 21:57:50 +01:00
lynxnb
ee2716403e Update dialogs' drag handle to use BottomSheetDragHandleView 2023-03-22 21:57:50 +01:00
lynxnb
2bcf0e2abd Update themes and styles to Material Design 3
This commit transitions all layouts and views to the use the new stuff from MD3.
2023-03-22 21:57:50 +01:00
Billy Laws
c928084bb1 Show a toast when per-game settings are active 2023-03-19 13:52:15 +00:00
Abandoned Cart
0949d51871 Clear or suppress some easy lint warnings 2023-03-18 16:16:15 +01:00
Abandoned Cart
e68baf9088 Centralize missingIcon and condition for use in DataItem
`One missing Bitmap to rule them all and one condition to find them.` Also eliminates passing that condition between methods. The data class can simply return the same instance every time it's necessary.
2023-03-15 14:25:24 +01:00
Abandoned Cart
905c0a47fa Allow the options, even if they're useless
Since this is instantiated in `onCreate` and may be recycled with different settings, relying on the audio to be disabled to determine if a mute action is available seems like a risky gamble.
2023-03-14 23:22:32 +00:00
Abandoned Cart
39393ec310 Move picture-in-picture configuration to method
This will also make the transition to per-game settings less of a collision later.
2023-03-14 23:22:32 +00:00
Abandoned Cart
a906c6d689 Use BuildConfig package name to forgo Context
This should adapt to the package name, despite not actually relying on the value of it to function. Intents are one of the most analyzed items for vulnerabilities and exploits.
2023-03-14 23:22:32 +00:00
Abandoned Cart
bd9050f6c7 Add an emulator pause button to the OSC 2023-03-14 23:22:32 +00:00
Abandoned Cart
69e322b76b Pausing should mute audio for looped music
Also adds pausing the surface in onPause and restoring it in onResume to avoid wasting resources when the activity is legitimately in the background.
2023-03-14 23:22:32 +00:00
Abandoned Cart
df96d74ca1 No use assigning null surface if null already
This also prevents any possibility a null value is falsely assigned to a valid surface for whatever reason.
2023-03-14 23:22:32 +00:00
Abandoned Cart
95a679e5cd Add an action to pause the emulator process 2023-03-14 23:22:32 +00:00
Abandoned Cart
a1143ee5de Respect the existing "mute" user preference 2023-03-14 23:22:32 +00:00
Abandoned Cart
bdc368e039 Add a mute button as a PiP window action 2023-03-14 23:22:32 +00:00
Abandoned Cart
4298415134 Add picture in picture for emulation activity 2023-03-14 23:22:32 +00:00
Abandoned Cart
6703a875f0 Support deprecation of getSerializableExtra 2023-03-11 18:27:15 +00:00
lynxnb
b724bc2309 Adjust default OSC opacity and color 2023-03-05 12:45:07 +01:00
KikiManjaro
1282362fce Add color selection to OSC
* Add bold text and antialiasing for osc buttons
* Fix osc dpad and button position (widder than taller)
* Set default OSC color to white background with black text
2023-03-05 12:45:07 +01:00
KikiManjaro
66d2965c63 Fix resetControls for opacity of OSC 2023-03-05 12:45:07 +01:00
Abandoned Cart
1f608da8e0 Drop local app path in preview summary 2023-03-05 11:48:46 +01:00
Billy Laws
7150ce0d1d Allow disabling the freeing of texture guest memory
This helps to prevent issues that result from the overlapping of buffer and texture data, by only ever syncing back textures if they are actually used as RTs, which are much less likely to overlap buffers.
2023-03-04 18:55:44 +00:00
lynxnb
787f2bde02 Enable localization for app strings
A setting has been added to override the system default language, should a user want a different language for the app.
2023-02-27 22:19:53 +01:00
lynxnb
aa1da257f8 Add an option to copy global settings to per-game ones 2023-02-27 19:56:53 +01:00
lynxnb
485bd2031c Only hide validation_layer setting on release instead of debug category 2023-02-27 19:56:53 +01:00
lynxnb
b2228a93da Reorder settings pt.2 2023-02-27 19:56:53 +01:00
lynxnb
ddfa9013a9 Use a proper tag for AppItem in intent extras and arguments 2023-02-27 19:56:53 +01:00
lynxnb
2f4778247c Use per-game settings during emulation 2023-02-27 19:56:53 +01:00
lynxnb
1a11aaa651 Add per-game settings configuration functionality 2023-02-27 19:56:53 +01:00
lynxnb
0467614dc0 Add per-game support to EmulationSettings
Implements support for retrieving per-game emulation settings
2023-02-27 19:56:53 +01:00
lynxnb
cd426d9f18 Split PreferenceSettings into AppSettings and EmulationSettings
`PreferenceSettings` was removed in favor of:
* `AppSettings`: stores general purpose settings mostly used for UI configuration and state
* `EmulationSettings`: stores emulation-related settings, most of these are passed to native emulation code
2023-02-27 19:56:53 +01:00
lynxnb
854ea1a42d Make NativeSettings a serializable data class 2023-02-27 19:56:53 +01:00
lynxnb
ee98aaaed1 Add a method to return format in AppItem 2023-02-27 19:56:53 +01:00
lynxnb
d1fd44e32e Move preference fragment to a separate file for modularity 2023-02-27 19:56:53 +01:00
lynxnb
a683978e8c Split preferences to multiple files for reusability 2023-02-27 19:56:53 +01:00
lynxnb
a1ca84f95e Move Kotlin settings to a dedicate package 2023-02-27 19:56:53 +01:00
lynxnb
180d1efd4d Revert "Toggle DisableFrameThrottling setting by clicking on FPS"
This commit reverts PR #2037. Passing `NativeSettings` to emulation code through a member reference, instead of a local variable, caused unpredictable crashes when using custom GPU drivers (v615+) on some Qualcomm SoCs.
The exact cause of the issue remains unknown, my best guess is that it was caused by an incorrect optimization performed on the Kotlin bytecode in release mode, which caused an issue when reading memory that had been forked, because of running emulation in a separate process.
Runtime settings modification will be reimplemented in the future via an alternative method.
2023-02-27 19:00:52 +01:00
lynxnb
5b0a397165 Update native settings after toggling frame throttling 2023-02-20 21:45:30 +00:00
Matesic Darko
f850271e2d toggle DisableFrameThrottling setting by clicking on FPS display
s/jSurface/vkSurface
2023-02-20 21:45:30 +00:00
Billy Laws
a47f010653 Add an option to allow CPU writes when fast readback is used 2023-02-20 18:01:49 +00:00
Abandoned Cart
b20c6e9fc4 onBackPressed -> onBackPressedDispatcher 2023-02-16 14:50:02 +01:00
german77
9e1c9caa36 input: Fix motion orientation based on phone orientation 2023-02-07 16:16:41 +00:00
german77
56d43a70c0 Implement SixAxis sensor 2023-02-07 16:16:41 +00:00
Billy Laws
bb3baa888d Add a hack to disable shader subgroup shuffles
These are about 100x as expensive on adreno than nvidia due to the lack of a dedicated instruction, since some games work fine without them add a hack to disable them.
2023-02-04 23:10:45 +00:00
PabloG02
8b9d6f79ab Add option to enable/disable shader cache 2023-01-28 11:57:19 +00:00
hacobot.dev
ff1e62df7a deleted unnecessary convertion 2023-01-23 21:28:49 +00:00
hacobot.dev
75f6f5e31c pull request requested changes 2023-01-23 21:28:49 +00:00
hacobot.dev
7cd13916a3 Main activity is now refreshing when the group checkbox is changed 2023-01-23 21:28:49 +00:00
hacobot.dev
b67bfe3848 Added functionality to make optional to group games by format and sort 2023-01-23 21:28:49 +00:00
Abandoned Cart
88b3f371f4 Display a preview of the current profile picture
This removes the need to concatenate the variable multiple times, recycles the scaled bitmap after it has been stored, addresses the Android Studio complaint about that method name, and generates a preview of the current profile image as the preference icon.
2023-01-13 14:28:20 +01:00
lynxnb
aa36c591c6 Exclude Home button from controller setup guide 2023-01-11 20:51:18 +00:00
Billy Laws
28b2a7a8a1 Dynamically apply GPU turbo clocks only when GPU submissions are queued
Allows for the GPU to clock down in cases where it's idle for most of the time, while still forcing maximum clocks when we care.
2023-01-08 19:30:52 +00:00
Billy Laws
3d31ade35f Implement an alternative buffer path using direct memory importing
By importing guest memory directly onto the host GPU we can avoid many of the complexities that occur with memory tracking as well as the heavy performance overhead in some situations. Since it's still desired to support the traditional buffer method, as it's faster in some cases and more widely supported, most of the exposed buffer methods have been split into two variants with just a small amount of shared code. While in most cases the code is simpler, one area with more complexity is handling CPU accesses that need to be sequenced, since we don't have any place we can easily apply writes to on the GPFIFO thread that wont also impact the buffer on the GPU, to solve this, when the GPU is actively using a buffer's contents, an interval list is used to keep track of any GPFIO-written regions on the CPU and any CPU reads to them will instead be directed to a shadow of the buffer with just those writes applied. Once the GPU has finished using buffer contents the shadow can then be removed as all writes will have been done by the GPU.

The main caveat of this is that it requires tying host sync to guest sync, this can reduce performance in games which double buffer command buffers as it prevents us from fully saturating the CPU with the GPFIFO thread.
2023-01-08 19:30:52 +00:00
Billy Laws
c67f27e914 Add a setting to control the maximum number of accumulated GPU cmds
This helps to keep the GPU fed when processing large command buffers which don't have any syncpoints to force a flush inbetween.
2023-01-08 19:30:52 +00:00
Billy Laws
77214a98dd Add a setting to force maximum GPU clocks on KGSL devices 2023-01-08 19:30:52 +00:00
PabloG02
80c0f8f04d
Implement full profile picture support
Extends the profile picture stub into a full-fledged implementation with the ability for users to set their profile picture in settings while having the Skyline icon as the default profile picture.
2022-12-27 22:53:41 +05:30
Dima
5a9a2861df Add TitleId TextView in App Dialog 2022-12-10 14:57:46 +00:00
Abandoned Cart
b08fcd7027 Favor a predefined "click" over system vibration 2022-12-10 14:57:33 +00:00
Abandoned Cart
cfd3bfecba Add a rudimentary OSC button vibration setting 2022-12-10 14:57:33 +00:00
Billy Laws
bfae292fb0 Make executor slot count setting exponential 2022-12-03 22:50:56 +00:00
Billy Laws
281838fde1 Apply GPU readback hack to both buffers and textures
And rename as appropriate.
2022-12-03 22:50:56 +00:00
Dima
e8e1b910c3 Add possibility to disable audio output 2022-12-02 00:33:28 +01:00
lynxnb
2e8d7b559c Use the original view padding/margin when applying window insets
Adding to the current view padding/margin values results in applying the insets over and over again as insets listeners can be called multiple times.
2022-11-28 00:04:39 +01:00
lynxnb
163f4f2014 Fix window insets handling when in landscape mode
To avoid code duplication, insets handling has been moved to a separate interface.
2022-11-23 19:49:42 +05:30
lynxnb
ab6c5f4c50 Improve robustness of KeyReader.import
* Close the input and output file streams before moving the output file to the final destination
* Clean up the destination path before moving the new file
* Introduce a `ImportResult` return value to differentiate between the possible causes of import errors
* Display more meaningful error messages in the UI
2022-11-23 19:49:42 +05:30
lynxnb
ee8c055641 Make GpuDriverInstallResult PascalCase 2022-11-23 19:49:42 +05:30
lynxnb
b209ae8e90 Account for stick flat area when retrieving axes value from a MotionEvent 2022-11-17 21:54:15 +01:00
lynxnb
c966220bab Zero-initialize axes history instead of using null values
Use zero initialization for axes history instead of using null values. Fixes the first axis event after launching a game being completely ignored.
2022-11-17 21:54:15 +01:00
lynxnb
3a657c44cc Don't ignore HAT axes input events
Capture HAT axes events ourselves instead of relying on the android framework to turn them into KeyCodes. Fixes handling of DPAD button presses on most controllers.
2022-11-17 21:54:15 +01:00
lynxnb
f1ec771944 Fix inverted axis polarity
In the case of axis value being zero, polarity would favor one side of the stick resulting in invalid values. Fix that by taking into account axis history when calculating polarity.
2022-11-17 21:54:15 +01:00
lynxnb
675e8dbb2e Move input handling code to a dedicated class 2022-11-17 21:54:15 +01:00
lybxlpsv
18861d73a3 Set systemUiVisibility during onResume for A11 2022-11-17 14:04:57 +01:00
lynxnb
cc71e7b56c Run emulation in a separate process
Exiting from emulation has always been a big issue for Skyline, with guest and host threads that would keep running in the background unless the app was manually killed. Running emulation in a separate process allows us to kill it when we are done, avoiding the need for complex exiting management code.
2022-11-11 11:49:33 +00:00
lynxnb
e2a5da1d67 Fix AppDialog layout
* Add a drag indicator at the top
* Fix flex layout wrapping when buttons didn't fit on a single line
* Fix BottomSheetDialog peek height too small on landscape orientation
* General cleanup of the layout
2022-11-09 23:07:23 +05:30
lynxnb
86364a84a2 Allow content to be drawn behind the navigation bar 2022-11-09 23:07:23 +05:30
lynxnb
f93d3b78d3 Add a drag indicator element at the top of LicenceDialog
A new `DragIndicatorView` had been introduced, which draws a small drag handle element. When used inside a `BottomSheetDialog`, this view will add a callback for hiding the indicator when the dialog is fully expanded.
2022-11-09 23:07:23 +05:30
lynxnb
f63fdf26c9 Partially revert 'Make all Dialogs use @color/backgroundColor as the background color'
This partially reverts commit 36a1f2a2ec.
2022-11-09 23:07:23 +05:30
lynxnb
dec04db647 AppListItem misc tweaks
* Restore text marquee on all layouts
* Text size and color tweaks
* List layout image has round corners
* Clean up unneeded attributes
2022-11-09 23:07:23 +05:30
Billy Laws
6c0f084aae Introduce hack to ignore frequently read-back textures
Readback can be especially slow on mobile due to the varying load pattern it creates which often prevents the CPU/GPU from clocking up. Since some games perform texture readback but don't actually use it for anything significant implement a hack to skip it and significantly improve performance in such cases.
2022-11-02 17:46:07 +00:00
Billy Laws
576bc6f37e Add CommandExecutor slot count setting 2022-11-02 17:46:07 +00:00
Abandoned Cart
267d25b5a5 Prevent a false positive SecurityException for DocumentsProvider 2022-10-25 20:17:18 +05:30
Billy Laws
160c2f3457 Add Ko-Fi credits to settings 2022-10-23 21:14:39 +01:00
lynxnb
782f9e37ee Add a system region setting
Needed for games such as AC:NH.
The `Auto` option automatically selects a region based on the currently selected system language.

Co-Authored-By: Timotej Leginus <35149140+timleg002@users.noreply.github.com>
2022-10-18 20:54:57 +01:00
lynxnb
bc016aff47 Make the vulkan validation layer toggleable via setting
As part of this commit, a new preference category for debug settings is being introduced. All future settings only relevant for debugging purposes will be put there. The category is hidden on release builds.
2022-10-18 19:47:23 +02:00
lynxnb
5cf14e45e1 Enable frame throttling when triple buffering is disabled 2022-10-18 19:27:14 +02:00
lynxnb
b17364bb92 Introduce a dev app flavor for side-by-side installation 2022-10-01 13:01:46 +02:00
Abandoned Cart
86f6fc510e Remove printing result message from author
There is no purpose in printing the same result twice, so any duplicate messages should instead allow the field to be truncated.
2022-08-27 18:54:27 +05:30
Abandoned Cart
1013857fc4 Refactor subtitle as author to remove subtitle
Subtitle is no longer used, so instances have been rerouted to author. DataItem was also updated to reflect the removal of a subtitle.
2022-08-27 18:54:27 +05:30
Abandoned Cart
04cae942ea Follow typical per-file detail formatting
Format the details in the expected format of individual files (instead of a complete game) and move the code to match the updated placement.
2022-08-27 18:54:27 +05:30
lynxnb
5d6eaee301 Correctly save/restore ROM version to/from game entry cache
PR #1758 introduced a bug where the game list would be entirely loaded every time the app was opened. This commit addresses that issue, which was caused by the `version` member of the cached game list being serialized to file (although incorrectly) but never actually read back when deserializing.
2022-08-21 20:24:36 +02:00
lynxnb
cfa5f0e030 Fix OSC alpha not changing on button press 2022-08-20 17:00:40 +02:00
KikiManjaro
8fb4e62c28 Add version information about rom
Review:
Co-authored-by: Niccolò Betto <niccolo.betto@gmail.com>
2022-08-20 13:48:07 +02:00
KikiManjaro
3407f6d530 Add OSC opacity adjustment 2022-08-20 13:46:17 +02:00
lynxnb
c4bf92a49f Fix Kotlin compilation errors from incorrect overloading of null-safe types 2022-08-17 12:16:26 +02:00
PixelyIon
2636a37b31
Introduce alternative FPS measurement for disabled frame throttling
The FPS is implicitly bound to the refresh rate due to the timestamp being that of the presentation time, this leads to a misleading FPS figure for disabled frame throttling. It has now been fixed by using the frame submission time rather than the presentation time when frame throttling is disabled and to make this more apparent the color of the OSD FPS has been changed.
2022-08-06 22:20:54 +05:30