bunnei
fbab3dc017
hle: kernel: Fix service_threads access to be thread safe V2.
- PR #7699 attempted to fix CreateServiceThread and ReleaseServiceThread to be thread safe, but inadvertently introduced a possible dead-lock.
- With this PR, we use a worker thread to manage the service thread list, allowing it only to be accessed by a single thread, and guaranteeing threads will not destroy themselves.
- Fixes a rare crash in Pokemon Sword/Shield, I've now run this game for ~12 hours non-stop and am quite confident this is a good solution for this issue.
4 years ago
Narr the Reg
f217849d21
core/hid: Increment shake force
With the current settings 2p mode in pokemon let's go wasn't showing up. By making the shake more violent we can make it appear without any effort using the keyboard
4 years ago
bunnei
ef9186172f
hle: kernel: Fix service_threads access to be thread safe.
- CreateServiceThread and ReleaseServiceThread can be accessed by different threads, uses a lock to make this thread safe.
- Fixes a rare crash in Pokemon Sword/Shield that can occur when a new service thread is being created while an old one is being destroyed.
4 years ago
Narr the Reg
01d886a3ba
service/hid: Decrease motion update rate
Motion stops working in Mario Tennis in swing mode if the update rate is too fast even when HW it updates at the same speed. 10ms it's the minimum period that the game needs to start working again.
4 years ago
Narr the Reg
56ac40bfc4
core/hid: Reduce gyro threshold even more
4 years ago
bunnei
d45b65b4d9
hle: kernel: k_page_table: Update SetProcessMemoryPermission.
4 years ago
bunnei
7526489b8b
hle: service: ldr: UnmapCodeMemory BSS only when set.
4 years ago
bunnei
84a61db25b
hle: kernel: k_page_table: ReadAndWrite -> UserReadWrite.
4 years ago
bunnei
0942533d2f
hle: kernel: k_page_table: Rename *ProcessCodeMemory -> *CodeMemory.
4 years ago
bunnei
b227426ae5
core: hle: kernel: svc: Updates to SetMemoryAttribute and SetMemoryPermission.
4 years ago
bunnei
090f1c400e
core: hle: kernel: k_page_table: Update CheckMemoryState.
4 years ago
german77
a52791af6b
yuzu: Use pad parameter to choose the correct controller
4 years ago
german77
353317f31e
yuzu: Add controller hotkeys
4 years ago
german77
06d840652f
core/hid: Add home and screenshot button support
4 years ago
german77
f333340a9c
core/hid: Set minimum gyro threshold
4 years ago
ameerj
664fcdc64b
gpu: Add shut down method to synchronize threads before destruction
4 years ago
ameerj
8badb6f4a7
Revert "Merge pull request #7668 from ameerj/fence-stop-token"
This reverts commit 5a612e9217 , reversing
changes made to 2e61bc3d51 .
4 years ago
ameerj
0585c60227
gpu: Use std::stop_token in WaitFence for VSync thread
Fixes a hang that may occur when stopping emulation and the VSync thread is blocked on the syncpoint condition variable.
4 years ago
german77
0e9f010ed6
core/hid: Add fallback to fullkey controllers
4 years ago
bunnei
b12695ddc4
core: hle: kernel: Implement thread pinning.
- We largely had the mechanics in place for thread pinning, this change hooks these up.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_thread_pinning.cpp .
4 years ago
german77
5dab578691
core/hid: Fix controller type validation
4 years ago
Feng Chen
064470286d
Remove invalid assertion statement
4 years ago
Feng Chen
669cb21687
Implement few type in bufferqueue query method
4 years ago
bunnei
714dcea191
core: hle: kernel: Updated implementation of svcSetHeapSize.
- Updates our svcSetHeapSize with latest HOS, furthermore allowing heap size to properly be extended/shrunk.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_set_heap_size.cpp .
4 years ago
bunnei
555481005d
core: hle: kernel: Implement SetMemoryPermission.
- Not seen in any games yet, but validated with kernel tests.
4 years ago
bunnei
bc45d0fc1a
core: hle: kernel: KThread: X18 should be a cryptographically random number.
- This was added with firmware 11.0.0 (https://switchbrew.org/wiki/11.0.0 ).
- X18 is OR'd by kernel with 1, to make sure it is odd.
4 years ago
bunnei
a1f637a6d0
hle: kernel: svc: GetInfo: Fix error checking with IdleTickCount.
- Enforce tha the supplied handle is invalid, not valid.
- This gets Witcher 3 booting.
4 years ago
ameerj
1fff9ea35e
kernel: Manually destroy the current process during shut down
Avoids a memory leak.
4 years ago
bunnei
acd1fff964
core: loader: kip: Minimal changes to fix KIP loading.
- Allows us to boot KIP (kernal apps), useful for testing the kernel.
4 years ago
bunnei
5192e8e092
core: hle: Remove global HLE lock.
- This was added early on as a hack to protect against some concurrency issues.
- It's not clear that this serves any purpose anymore, and if it does, individual components should be fixed rather than using a global recursive mutex.
4 years ago
Narr the Reg
3554c18269
core/hid: Cancel any vibration after the test
4 years ago
Narr the Reg
3e0a577553
core/hid: Fix faulty analog triggers
4 years ago
Lioncash
726de453bb
common/input: Avoid numerous large copies of CallbackStatus
CallbackStatus instances aren't the cheapest things to copy around
(relative to everything else), given that they're currently 520 bytes in
size and are currently copied numerous times when callbacks are invoked.
Instead, we can pass the status by const reference to avoid all the
copying.
4 years ago
Valeri
295b676fe6
Remove erroneous #pragma once
4 years ago
Narr the Reg
66a86f54af
service/hid: Improve console motion accuracy
4 years ago
itsmeft24
9a28199c5a
Update k_code_memory.h
4 years ago
itsmeft24
4b0b2d7d1d
make KCodeMemory::GetSourceAddress const
Co-authored-by: Mai M. <mathew1800@gmail.com>
4 years ago
bunnei
5788e077cd
hle: kernel k_scheduler: EnableScheduling: Remove redundant GetCurrentThreadPointer calls.
4 years ago
bunnei
1b1ed86ec7
hle: kernel k_process: Remove unnecessary .at usage with thread pinning methods.
4 years ago
bunnei
38a6477770
hle: kernel: Remove unnecessary virtual specifier on NotifyAvailable.
4 years ago
bunnei
829c4b6144
hle: kernel: Remove unnecessary virtual specifier on EndWait.
4 years ago
bunnei
1457a75a40
hle: kernel: k_light_condition_variable: Revert unnecessary license comment changes.
4 years ago
bunnei
cd4582dc8b
hle: kernel: k_condition_variable: Revert unnecessary style changes.
4 years ago
bunnei
4b2aa52da9
hle: kernel: Remove unnecessary virtual specifier on CancelWait.
4 years ago
bunnei
273223d5f1
hle: kernel: service_thread: Force stop threads on destruction.
4 years ago
bunnei
0231cbd79f
hle: kernel: k_light_lock: Implement CancelWait.
- Fixes a crash in Megadimension Neptunia VII.
4 years ago
bunnei
d17b7268f6
hle: kernel: service_thread: Use std::jthread.
- Fixes a potential deadlock on service thread shutdown.
4 years ago
bunnei
b5970145a5
hle: kernel: k_thread: Skip reschedule on DisableDispatch with SC.
4 years ago
bunnei
6d2bf18df9
hle: kernel: k_thread: Rename sleeping_queue -> wait_queue.
4 years ago
bunnei
43d706c7d2
hle: kernel: svc: Fix deadlock that can occur with single core.
4 years ago