Lioncash
a5925f8407
kernel/handle_table: Amend reference to CTR-OS in Create()
...
Another hold-over from Citra.
2018-12-04 01:50:44 -05:00
Lioncash
676c46cc81
kernel/svc: Implement the resource limit svcGetInfo option
...
Allows a process to register the resource limit as part of its handle
table.
2018-12-04 01:50:30 -05:00
Luke Street
0652d95dab
svc: Implement SetThreadActivity (thread suspension)
2018-12-04 01:23:50 -05:00
V.Kalyuzhny
cbbcdfc25d
[Kernel::CreateThread] Match format specifiers to LOG_TRACE's arguments
2018-12-04 05:13:50 +02:00
Zach Hilman
0ac4caaa54
scheduler: Avoid manual Reschedule call
...
This will automatically occur anyway when PrepareReschedule is called
2018-12-03 21:22:09 -05:00
bunnei
5de85c8701
Merge pull request #1840 from lioncash/info
...
svc: Reorganize svcGetInfo, handle more error cases for existing implemented info categories
2018-12-03 18:46:22 -05:00
Zach Hilman
5d50fa0824
scheduler: Only work steal higher priority threads from other cores
2018-12-03 17:29:30 -05:00
Zach Hilman
b999d2df45
applets: Correct event ResetTypes from OneShot to Sticky
...
Fixes bugs relating to signalling in software keyboard.
2018-12-03 17:27:40 -05:00
Zach Hilman
b8da98046e
qt: Implement GUI dialog frontend for ProfileSelector
...
Presents profiles in a list, similar to switch.
2018-12-03 17:26:27 -05:00
Zach Hilman
adb047e6fa
am: Use ProfileSelect applet
2018-12-03 17:26:27 -05:00
Zach Hilman
52631b7066
applets: Implement ProfileSelect applet
...
Allows the player to select an emulated profile.
2018-12-03 17:26:27 -05:00
Zach Hilman
eea28c76f1
core: Add getter/setter for ProfileSelector in System
2018-12-03 17:26:26 -05:00
Zach Hilman
3e2f2bc839
frontend: Add frontend applet for ProfileSelect
...
Responsible for selecting a profile and firing callback upon completion.
2018-12-03 17:26:26 -05:00
Zach Hilman
33159fdb9b
software_keyboard: Signal state changed event upon construction
...
Previously, ILibraryAppletAccessor would signal upon creation of any applet, but this is incorrect. A flag inside of the applet code determines whether or not creation should signal state change and swkbd happens to be one of these applets.
2018-12-03 17:26:26 -05:00
Zach Hilman
51bfd3864f
loader: Add support for reading the name of game's developer
2018-12-03 17:21:25 -05:00
Zach Hilman
a22a4992e8
aoc_u: Obey disabled add-ons list when listing DLC
2018-12-03 17:21:25 -05:00
Zach Hilman
1c3bade698
patch_manager: Obey disabled add-ons list when patching game
2018-12-03 17:21:25 -05:00
Zach Hilman
965eade4d5
core: Make GetGameFileFromPath function externally accessible
2018-12-03 17:20:34 -05:00
Zach Hilman
1cff2a3779
settings: Store list of disabled add-ons per title ID
2018-12-03 17:20:34 -05:00
bunnei
21855362e2
Merge pull request #1835 from lioncash/cache-global
...
filesystem: De-globalize registered_cache_union
2018-12-03 17:11:26 -05:00
bunnei
7802364db6
Merge pull request #1803 from DarkLordZach/k-able-event
...
kernel: Divide Event into ReadableEvent and WritableEvent
2018-12-03 17:05:57 -05:00
bunnei
8501367c45
Merge pull request #1833 from lioncash/clean
...
service/fsp_srv: Implement CleanDirectoryRecursively
2018-12-03 17:04:05 -05:00
bunnei
03fb716288
Merge pull request #1839 from lioncash/init
...
service/audio/audout_u: Amend constructor initialization list order
2018-12-03 17:03:00 -05:00
bunnei
fa4947cc8b
Merge pull request #1841 from ogniK5377/npad-mode-fix
...
Fixed crash with SetNpadMode
2018-12-03 17:02:40 -05:00
Lioncash
c11074738d
loader/nso: Remove dependency on the System class
...
Similar to the NRO changes, we can also pass the process explicitly as a
parameter from Load instead of indirecting through the System class.
2018-12-02 23:39:03 -05:00
Lioncash
2148254d09
loader/nro: Make the static LoadNro function internally linked
...
This simply acts as a forwarding function for the Load() function, so
this doesn't need to be directly exposed.
2018-12-02 23:38:58 -05:00
Lioncash
1207174abb
file_sys/directory: Amend path buffer size for directory entries
...
The path buffer is actually 0x301 (769) characters in length, with the
extra character being intended for the null-terminator.
2018-12-02 23:15:58 -05:00
Lioncash
d61df4137e
loader/nro: Remove dependency on the System class
...
Load() is already given the process instance as a parameter, so instead
of coupling the class to the System class, we can just forward that
parameter to LoadNro()
2018-12-02 22:18:52 -05:00
Lioncash
fe28aee74d
service/usb: Update function table
...
Updates the function table for IClientEpSession based off information
provided by SwitchBrew.
2018-12-02 15:49:40 -05:00
Lioncash
0b467c5de0
service/erpt: Update function table
...
Updates the function table according to information provided by
SwitchBrew.
2018-12-02 15:46:44 -05:00
David Marcec
3a8283f0ed
Fixed crash with SetNpadMode
...
fixed crash due to handheld
2018-12-03 02:45:08 +11:00
Lioncash
9a1400b30d
svc: Use the current process' handle table for retrieving the process instance to act upon
...
The kernel uses the handle table of the current process to retrieve the
process that should be used to retrieve certain information. To someone
not familiar with the kernel, this might raise the question of "Ok,
sounds nice, but doesn't this make it impossible to retrieve information
about the current process?".
No, it doesn't, because HandleTable instances in the kernel have the
notion of a "pseudo-handle", where certain values allow the kernel to
lookup objects outside of a given handle table. Currently, there's only
a pseudo-handle for the current process (0xFFFF8001) and a pseudo-handle
for the current thread (0xFFFF8000), so to retrieve the current process,
one would just pass 0xFFFF8001 into svcGetInfo.
The lookup itself in the handle table would be something like:
template <typename T>
T* Lookup(Handle handle) {
if (handle == PSEUDO_HANDLE_CURRENT_PROCESS) {
return CurrentProcess();
}
if (handle == PSUEDO_HANDLE_CURRENT_THREAD) {
return CurrentThread();
}
return static_cast<T*>(&objects[handle]);
}
which, as is shown, allows accessing the current process or current
thread, even if those two objects aren't actually within the HandleTable
instance.
2018-12-02 03:41:49 -05:00
Lioncash
a3ecd8177f
svc: Reorganize svcGetInfo, handle more error cases for existing implemented info categories
...
Our implementation of svcGetInfo was slightly incorrect in that we
weren't doing proper error checking everywhere. Instead, reorganize it
to be similar to how the kernel seems to do it.
2018-12-02 03:40:10 -05:00
Zach Hilman
9caabad517
svc: Avoid performance-degrading unnecessary reschedule
2018-12-02 00:44:40 -05:00
Lioncash
ce67a308aa
service/audio/audout_u: Amend constructor initialization list order
...
Orders the constructor initializer list the same way the members of the
class are declared. Prevents -Wreorder warnings
2018-12-01 23:56:20 -05:00
Lioncash
24480be3da
file_sys/registered_cache: Eliminate variable shadowing
...
Also inverts if statements where applicable to allow unindenting code a
little bit.
2018-12-01 23:50:13 -05:00
Lioncash
de9051633c
filesystem: De-globalize registered_cache_union
...
We can just return a new instance of this when it's requested. This only
ever holds pointers to the existing registed caches, so it's not a large
object. Plus, this also gets rid of the need to keep around a separate
member function just to properly clear out the union.
Gets rid of one of five globals in the filesystem code.
2018-12-01 23:43:23 -05:00
Lioncash
0a55663c74
crypto/key_manager: Remove unused variable in GetTicketblob()
2018-12-01 22:37:51 -05:00
bunnei
e728e683b4
Merge pull request #1830 from Subv/vi_ub
...
Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.
2018-12-01 22:25:10 -05:00
Lioncash
cd9570ce0d
Fix debug build
...
A non-existent parameter was left in some formatting calls (the logging
macro for which only does anything meaningful on debug builds)
2018-12-01 02:11:42 -05:00
Lioncash
7a47740f52
file_sys: Override missing mutating functions to be stubbed out for ReadOnlyVfsDirectory by default
...
Ensures that read only indeed means read only.
2018-11-30 23:52:56 -05:00
Lioncash
9c56be6af9
service/fsp_srv: Implement CleanDirectoryRecursively
...
This is the same behavior-wise as DeleteDirectoryRecursively, with the
only difference being that it doesn't delete the top level directory in
the hierarchy, so given:
root_dir/
- some_dir/
- File.txt
- OtherFile.txt
The end result is just:
root_dir/
2018-11-30 20:17:28 -05:00
Subv
b0ec648f85
Services/VI: Dereferencing an uninitialized std::optional is undefined behavior.
...
Assert that it is not empty before using it in the DequeueBuffer wait callback.
2018-11-30 16:06:49 -05:00
Lioncash
8f52802f2b
service/set: Convert GetLanguageCode over to using PushEnum()
...
This code was around prior to the introduction of PushEnum, so convert
it over so we don't need to cast here.
2018-11-30 09:08:07 -05:00
Lioncash
1e5d6c1b99
service/set: Implement MakeLanguageCode
...
This function simply converts a given index into a language code.
2018-11-30 09:08:03 -05:00
Zach Hilman
c011ba51b7
hle_ipc: Refactor SleepClientThread to avoid ReadableEvent
2018-11-29 09:14:20 -05:00
Zach Hilman
b0d0735e9b
kernel/event: Reference ReadableEvent from WritableEvent
2018-11-29 08:48:40 -05:00
Zach Hilman
fe0071f8fa
core: Port all current usages of Event to Readable/WritableEvent
2018-11-29 08:45:41 -05:00
Zach Hilman
c03864f7c3
hle_ipc: Use event pair for SleepClientThread
2018-11-29 08:42:26 -05:00
Zach Hilman
bc1d399d7a
kernel: Add named event table
...
Used to store ReadableEvents of all events on the system.
2018-11-29 08:42:26 -05:00