Commit Graph

72 Commits

Author SHA1 Message Date
◱ PixelyIon
7ad86ec46f Improve span::as_string and other minor fixes 2020-10-02 15:28:48 +00:00
◱ PixelyIon
97ac45d83b Update Logger to use NDK Logger APIs + Improve Backing API + Fix FDSAN issues 2020-10-02 15:28:48 +00:00
◱ PixelyIon
157c54f918 Implement a few HID Functions + Fix FAB handler 2020-10-02 15:28:48 +00:00
◱ PixelyIon
4cc3a3b2e8 Move NVDRV + IHOSBinder Internals to Discrete Components + Fix Lint 2020-09-20 20:07:33 +00:00
Willi Ye
4076d84efc
NCA decryption (#99)
* NCA decryption
* Remove unnecessary new lines
* Remove loader error dialog
* Always show ROMs
* Address CRs
* Add subtitle padding in grid mode
2020-09-14 19:23:40 +05:30
◱ PixelyIon
65019375ca Implement Guest Touch-Screen Support 2020-09-08 12:55:33 +00:00
◱ PixelyIon
1a58a2e967 Implement Rumble Support for Controllers and Device Vibrators 2020-09-06 15:31:20 +00:00
◱ PixelyIon
7290a80c3e Move to Callback for Input Initialization + ConditionalVariable for Surface 2020-08-21 11:48:29 +00:00
◱ PixelyIon
07c2f2d891 Significantly Improve Accuracy of HID
This commit significantly increases the accuracy of the prior HID code due to testing on the Switch. It is now fully accurate in all supported scenarios, them being assignment mode, orientation, color writes and system properties. In addition, review comments were addressed and fixed in the PR.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
ee2fdbdf6a Fix Joy-Con Pair Crash + Implement More HID Service Functions
This fixes a Joy-Con Pair bug which caused a crash when a partner device was set to none while being set as a partner. In addition, the following HID service functions were implemented:
* GetSupportedNpadStyleSet
* ActivateNpadWithRevision
* GetNpadJoyHoldType
* AcquireNpadStyleSetUpdateEventHandle
2020-08-21 11:48:29 +00:00
◱ PixelyIon
6a931b95b0 Implement C++ Support for Controller Configuration
This commit adds support to the C++ end of things for controller configuration. It isn't targeting being 1:1 to HOS for controller assignment but is rather based on intuition of how things should be.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
75d485a9a7 Addition of Controller Configuration UI
This commit adds in the UI for Controller Configuration to Settings, in addition to introducing the storage and loading of aforementioned configurations to a file that can be saved/loaded at runtime. This commit also fixes updating of individual fields in Settings when changed from an external activity.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
8e1f8ae7e9 Make UI fully usable using a controller
This commit focuses on making the UI completely usable using a controller so that a user won't have to switch between their device's touch screen and a controller constantly.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
102f26d08e Refactor C++ Input
This commit refactors the C++ end of Input so it'll be in line with the rest of the codebase and be ready for the extension with multiple players and controller configuration.
2020-08-21 11:48:29 +00:00
◱ PixelyIon
5fec7eefd0 Refactor HID Shared Memory
This commit refactors and reorders a lot of the HID Shared Memory from the previous commits to be in line with the rest of the codebase.
2020-08-21 11:48:29 +00:00
Billy Laws
b167abcdb7 Initial Kotlin Input Implementation
This commit contains the Kotlin side of the initial Input implementation, this is based on the work done in the `hid` branch in `bylaws/skyline`.
Co-authored-by: ◱ PixelyIon <pixelyion@protonmail.com>
2020-08-21 11:48:29 +00:00
Billy Laws
0219eda2db Initial C++ Input Implementation
This commit contains the C++ side of the initial Input implementation, this is based on the work done in the `hid` branch in `bylaws/skyline`.
Co-authored-by: ◱ PixelyIon <pixelyion@protonmail.com>
2020-08-21 11:48:29 +00:00
Billy Laws
6edf89b538
Initial Savedata Implementation (#75)
* Rework VFS to support creating and writing files and introduce OsFileSystem
OsFileSystem abstracts a directory on the device using the filesystem API.
This also introduces GetEntryType and changes FileExists to use it.

* Implement the Horizon FileSystem APIs using our VFS framework
Horizon provides access to files through its IFileSystem class, we can
closely map this to our vfs::FileSystem class.

* Add support for creating application savedata
This implements basic savedata creation using the OsFileSystem API. The
data is stored in Skyline's private directory is stored in the same
format as yuzu.
2020-08-09 01:08:51 +05:30
Willi Ye
f72b81fcea
Make sure icons have a 1:1 ratio (#80)
* Make sure icons have a 1:1 ratio
* Use recyclerview padding to increase grid edge margins
* Fix race condition in searching roms
* Use notify insert for adapter
2020-08-08 23:31:21 +05:30
Willi Ye
1f282af87e More code style aligning
* Null terminate nickname array and correct character limit in settings perference
2020-07-21 18:29:45 +00:00
Willi Ye
93da9f2826 Align code style with project
* Return correct error code for invalid user
* Always return first icon color
2020-07-21 18:29:45 +00:00
Willi Ye
ffb9e743dd Add profile service to support custom usernames 2020-07-21 18:29:45 +00:00
Willi Ye
b86aac26d7 Align with code style and remove unnecessary code 2020-07-21 18:11:43 +00:00
Willi Ye
c3e54d1abf Redesign cards in grid view
* Refactor some classes and clean up
* Refresh style on the fly
2020-07-21 18:11:43 +00:00
Willi Ye
27d7839bcb MainActivity: Fix snackbar overlapping FABs 2020-07-14 09:15:57 +00:00
Billy Laws
b1e15efbab Use new android R APIs for hiding insets 2020-07-08 20:11:55 +00:00
Billy Laws
af709efb15 Kotlin updates for compatibility with the Android R SDK preview 2020-07-08 20:11:55 +00:00
Billy Laws
45b4811c5b Create adaptive icons for pinned games 2020-07-01 06:24:41 +00:00
Billy Laws
a53d6266c7 Implement a basic NSP loader
An NSP (Nintendo Submission Package) is effectively a PFS0 containing
NCAs, there are also tickets and a CNMT file which contains metadata
about updates. The current implementation is very basic and only
support Control and Program NCAs which is enough for loading games.

Support for updates and dlc will be added at a later date.
2020-07-01 06:24:41 +00:00
Billy Laws
a5513bd7e6 Implement an NCA parser and loader
Nintendo Content Archives are used to store the assets, executables
and updates of applications. They support holding either a PFS0 or a
RomFS.

An NCA's ExeFS can be loaded by placing each NSO sequentially into
memory, starting with rtld which will link them together.

Currently only decrypted NCAs are supported, encryption and BKTR
handling will be added at a later time.
2020-07-01 06:24:41 +00:00
Billy Laws
3a23ec06a4 Implement NSO loader
The NSO format is used by all retail games and some homebrew. It
supports compressing sections with lz4 and dynamic linking through the
use of rtld.
2020-06-28 07:54:12 +00:00
Billy Laws
1bb979a7e1 Introduce new loader JNI for parsing application data and port Kotlin
code to use it

This will help ease the process of implementing new formats in the
future and remove duplicated code.
2020-06-20 20:26:53 +00:00
◱ PixelyIon
4d787c904e Improvements to UI/UX
This commit makes a few improvements to the UI/UX:
* Crop Game Icons to ImageView
* Controller Support for Game List
* EmulationActivity is fullscreen now
2020-04-24 17:09:13 +05:30
◱ PixelyIon
05f3e3c3ac Improve NCE and Finish Up Refactor
This commit mainly finishes up refactor by fixing everything brought up in the CR + Improving NCE somewhat and actually killing the child processes properly now.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
c76ef3730b Move to MPL-2.0
We earlier moved to LGPLv3.0 or Later. This was a mistake as what we wanted was being able to link to proprietary libraries but LGPL is the opposite and it allows linking proprietary libraries to libskyline instead. After further consideration, we've moved to MPL-2.0, it allows linking to proprietary libraries and is a standardized license as compared to adding an exception to GPL.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
1c54bff215 Make AppDialog Expand Fully and Fix Race in MainActivity::addEntries
This commit mainly fixes the issue with `AppDialog` where it didn't expand fully in landscape leading to UX issues. In addition, a race condition was fixed in `MainActivity::addEntries`, in regards to `foundCurrent` being returned incorrectly. The text in the performance counters were also made yellow and much more opaque.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
7f78a679c3 Add Performance Statistics to EmulationActivity
This commit adds performance statistics to the emulator that can be toggled in preferences. The layout of `EmulationActivity` was also changed from `ConstraintLayout` to `RelativeLayout` due to poor performance of the former.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
91644255da Add Preference For Always Showing Game Information
This commit mainly adds a preference for always showing the game information. In addition to a tiny tweak to the contributing guidelines.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
4500f54e85 Refactor Activities and Improve MainActivity
This commit mainly refactors all activities to bring them in-line with the guidelines and makes certain improvements such as using `Snackbar`s rather than `Toast`s where possible, Using `CoordinatorLayout` to allow the app bar to hide itself when possible, the app bar has also been consolidated into it's own layout file to increase layout redraw performance as existing views can be used.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
0a5460f4fc Refactor Utilities
This refactors the utilities which at the moment is only `RandomAccessDocument`.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
2ce8581aa6 Refactor + Redesign AppDialog
This commit refactors `AppDialog` by bringing it in line with the guidelines. In addition, it improves the design of it substantially by modifying the layout and making it a `BottomSheetDialogFragment`.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
ce4d295d81 Refactor Preferences and Loaders
This refactors all preferences and loaders in regards to This commit mainly refactors the adapters by adding spacing, comments and following other guidelines. In addition, preferences are now moved into their own sub-package and `LicensePreference` has a minor UI update.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
c9dcb070ad Grid Layout Support
With `RecyclerView` being used rather than `ListView` or `GridView`. It's now possible to display the items in a flexible manner and so support for a grid view in addition to the already existing list view was added in.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
d86d5c1a35 Refactor and Convert Adapters to RecyclerView.Adapter
This commit mainly refactors the adapters by adding spacing, comments and following other guidelines. In addition, it moves from using `BaseAdapter` to `RecyclerView.Adapter` which leads to much cleaner adapter classes.
a
2020-04-23 22:26:27 +05:30
◱ PixelyIon
55a9f8e937 Refactor all Game-related Kotlin Classes/Objects
This refactors most game-related classes and objects mainly adding spacing, adding comments and making improvements if possible.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
f4968793b8 Fix minor inaccuracy with VMM and mutexes
This commit fixes a tiny inaccuracy with the VMM which was a problem with block insertion, The mutexes on the other hand had a minor issue regarding owner checks.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
41ddaf7f33 Add in Licenses to Settings
This commit adds in all the licenses to the end of settings by introducing a new type of preference: "LicensePreference"
2020-04-23 22:26:27 +05:30
◱ PixelyIon
820bbaede5 Fix occurrence of multiple headers in game list + Make TinyXML2 Static
This commit mainly fixes multiple headers in the game list, which was caused by using the wrong variable for the recursive function. In addition, it makes TinyXML2 statically linked to libskyline which makes it the lone shared objects present in APKs.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
72272fa4c2 Replace xdrop/fuzzywuzzy with tdebatty/java-string-similarity
This commit replaced `xdrop/fuzzywuzzy` with `tdebatty/java-string-similarity` as the former is under an incompatible GPLv3 license.
2020-04-23 22:26:27 +05:30
◱ PixelyIon
c37f350c02 Move from GPLv3 to LGPLv3 or later
Skyline has been licensed with GPLv3 but as we want to look into optional ads in the future, and that would require linking AdMob SDKs which are proprietary. So, we decided to move to LGPLv3 so we could keep that option open as a revenue stream. 

We've gathered consent from all contributors for the license change:
* PixelyIon - https://github.com/PixelyIon (Commit Author)
* Zephyren25 - https://github.com/zephyren25
* ByLaws - https://github.com/bylaws
* IvarWithoutBones - https://github.com/IvarWithoutBones
* Cyuubi - https://github.com/Cyuubi
* greggamesplayer - https://github.com/greggameplayer
2020-04-23 22:26:27 +05:30