Commit Graph

9460 Commits

Author SHA1 Message Date
liamwhite 709879cfc1
Merge pull request #9773 from bunnei/fix-process-resource
core: kernel: k_process: Use application system resource.
2023-02-11 10:28:50 -05:00
bunnei abd826ba87
Merge pull request #9742 from liamwhite/svc-wrap-only
kernel/svc: switch to generated wrappers
2023-02-10 21:41:22 -08:00
bunnei e79270507b core: kernel: k_process: Use application system resource. 2023-02-10 21:03:39 -08:00
ameerj 5e746da981 kernel: Refactor thread_local variable usage
On MSVC at least, there seems to be a non-trivial overhead to calling GetHostThreadId().

This slightly reworks the host_thread_id variable to reduce some of the complexity around its usage, along with some small refactors around current_thread and dummy thread
2023-02-10 20:43:06 -05:00
Liam 36b70dec05 kernel: avoid usage of bit_cast 2023-02-10 09:13:58 -05:00
Narr the Reg 5e9fa5def5 core: hid: Use gyro thresholds modes set by the game 2023-02-09 19:07:50 -06:00
liamwhite f6477b91f9
Merge pull request #9747 from german77/SetSupportedNpadIdTypes
service: hid: Return error if arguments of SetSupportedNpadIdType is invalid
2023-02-08 10:09:26 -05:00
Narr the Reg c27006e99d service: hid: Return error if arguments of SetSupportedNpadIdType is invalid 2023-02-07 21:11:39 -06:00
Liam 2415d37ea2 kernel/svc: switch to generated wrappers 2023-02-06 23:57:44 -05:00
Liam 82c2a3da9f kernel: fix compilation with older gcc 2023-02-06 13:14:27 -05:00
Liam 92eb091ddb kernel/svc: Split implementations into separate files 2023-02-04 22:37:43 -05:00
ameerj 979e4d9950 fsp_srv: Copy HLE Read Buffer for OutputAccessLogToSdCard 2023-02-03 00:12:16 -05:00
ameerj 2d2522693e Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"
This reverts commit 25fc5c0e11, reversing
changes made to af20e25081.
2023-02-03 00:08:45 -05:00
bunnei 25fc5c0e11
Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"
2023-02-02 19:04:50 -08:00
liamwhite b01698775b
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer" 2023-02-02 15:53:28 -05:00
Liam 7d1c3a3f59 kernel: add KDeviceAddressSpace 2023-02-01 17:18:21 -05:00
bunnei 92c5ab33b7
Merge pull request #9696 from german77/please_forgive_me_for_this_sin
input_common: Implement turbo buttons
2023-02-01 12:08:34 -08:00
german77 75e81885b0 input_common: Implement turbo buttons 2023-02-01 12:42:05 -06:00
bunnei de28cd0c2d
Merge pull request #9697 from liamwhite/kcap
kernel: add KCapabilities
2023-01-31 10:51:10 -08:00
bunnei ed4a88bd93
Merge pull request #9508 from ameerj/hle-ipc-buffer-span
hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer
2023-01-30 12:17:09 -08:00
Liam 67a8740af6 kernel: add KCapabilities 2023-01-29 22:08:28 -05:00
Levi Behunin d5fc56db4b Move to Clang Format 15
Depends on https://github.com/yuzu-emu/build-environments/pull/69

clang-15 primary run
2023-01-29 17:49:42 -07:00
bunnei 32b2a72e7b
Merge pull request #9666 from liamwhite/wait-for-me
kernel: fix incorrect locking order in suspension
2023-01-27 15:06:09 -08:00
Liam e9e1e7aa3a kernel: unbreak min/max template deduction on Apple Clang 2023-01-26 17:43:37 -05:00
bunnei 5669692b4e
Merge pull request #9670 from merryhime/revert-af5ecb0b15d4449f58434e70eed835cf71fc5527
Revert "MemoryManager: use fastmem directly."
2023-01-25 22:28:55 -08:00
bunnei 2158ccda3b
Merge pull request #9604 from liamwhite/pt
kernel: KPageTable: update
2023-01-25 22:27:48 -08:00
Narr the Reg cc821bfae1 Revert 9617 and fix it on input_common 2023-01-25 13:52:50 -06:00
Merry dc7ab4c5d6 Revert "MemoryManager: use fastmem directly."
This reverts commit af5ecb0b15.
2023-01-25 10:12:04 +00:00
liamwhite a68af583ea
Merge pull request #9492 from german77/joycon_release
Input_common: Implement custom joycon driver v2
2023-01-24 09:29:37 -05:00
Liam 693cad8e9b kernel: split SetAddressKey into user and kernel variants 2023-01-23 20:31:03 -05:00
Liam 5086380a63 kernel: fix incorrect locking order in suspension 2023-01-23 17:14:41 -05:00
Liam 31e54c4573 kernel: KPageTable: update 2023-01-22 13:17:29 -05:00
liamwhite 02ac593257
Merge pull request #9617 from german77/off_by_one
core: hid: Fix stick minimum range
2023-01-22 13:14:10 -05:00
liamwhite 9705094a57
Merge pull request #9613 from Kelebek1/demangle
Add stacktrace symbol demangling
2023-01-22 13:13:58 -05:00
bunnei f78068d7bf
Merge pull request #9611 from liamwhite/patch-1
debugger: add host fastmem pointer fetch command
2023-01-20 10:00:33 -08:00
Narr the Reg d9ee7c3297 core: hid: Make use of SCOPE_EXIT and SCOPE_GUARD where applicable 2023-01-20 00:51:46 -06:00
Narr the Reg 4a307a7b3a core: hid: Only set the polling mode to the correct side 2023-01-19 18:05:23 -06:00
german77 d05ea2f3eb input_common: Fix issue where ring and irs are enabled at the same time 2023-01-19 18:05:22 -06:00
Narr the Reg 459fb2b213 input_common: Implement joycon ir camera 2023-01-19 18:05:22 -06:00
german77 5cb437703f yuzu: Add ring controller test button 2023-01-19 18:05:22 -06:00
german77 527dad7097 input_common: Use DriverResult on all engines 2023-01-19 18:05:22 -06:00
german77 e1a3bda4d9 Address review comments 2023-01-19 18:05:22 -06:00
Narr the Reg 1c08d532e0 core: hid: Fix input regressions 2023-01-19 18:05:22 -06:00
german77 6d6b7bdbc3 input_common: Implement joycon nfc 2023-01-19 18:05:21 -06:00
Narr the Reg 36d5e0a411 service: hid: Set led pattern and fix color detection 2023-01-19 18:05:20 -06:00
Narr the Reg ed5fa10e97 core: hid: Enable pulling color data from controllers 2023-01-19 18:05:20 -06:00
Narr the Reg a4074001fe core: hid: Migrate ring from emulated devices to emulated controller 2023-01-19 18:05:20 -06:00
bunnei 9ca3a4758a
Merge pull request #9623 from liamwhite/wp-oops
memory: fix watchpoint use when fastmem is enabled
2023-01-19 10:50:21 -08:00
bunnei 413df0811d
Merge pull request #9619 from liamwhite/timing-spaghetti
timing: wait for completion on unregister
2023-01-18 15:13:38 -08:00
Liam f1a0ce0e70 memory: fix watchpoint use when fastmem is enabled 2023-01-15 10:24:31 -05:00
Liam 0953cdd271 timing: wait for completion on unregister 2023-01-14 15:48:01 -05:00
Kelebek1 42b16bb33a Be careful of mangled out of bounds read 2023-01-14 19:53:55 +00:00
german77 50c86b3c2a core: hid: Fix stick minimum range 2023-01-14 11:53:43 -06:00
Kelebek1 80a55c1663 Add stacktrace symbol demangling 2023-01-14 04:43:21 +00:00
Liam e9c3d16f6f debugger: add host fastmem pointer fetch command 2023-01-12 18:35:14 -05:00
Liam 2f2ef5b147 nvnflinger: correct swap interval handling 2023-01-11 22:05:08 -05:00
bunnei a5693afa03
Revert "Revert "k_page_group: synchronize"" 2023-01-07 15:32:10 -08:00
bunnei 66e4a48b75
Merge pull request #9563 from german77/crash_not_allowed
input_common: Create an update engine
2023-01-07 13:41:27 -08:00
liamwhite 3c05988df2
Merge pull request #9561 from liamwhite/update-dynarmic
externals: update dynarmic, xbyak
2023-01-06 10:00:18 -05:00
liamwhite 6d74490139
Merge pull request #9558 from MonsterDruide1/network-timeout-noerror
net: Silently translate ETIMEDOUT network error
2023-01-06 10:00:09 -05:00
Narr the Reg 8042ce7e19 input_common: Create an update engine 2023-01-05 19:24:29 -06:00
Liam 1ee0540f82 externals: update dynarmic, xbyak 2023-01-05 18:06:06 -05:00
Fernando Sahmkow af5ecb0b15 MemoryManager: use fastmem directly. 2023-01-05 06:06:33 -05:00
MonsterDruide1 688a9fbfa6 net: Silently translate ETIMEDOUT network error 2023-01-05 11:54:36 +01:00
liamwhite bbeb6e460c
Merge pull request #9518 from gidoly/revert-9504-pg2
Revert "k_page_group: synchronize"
2023-01-03 21:40:57 -05:00
MonsterDruide1 04cb05fce0 TAS: Immediately switch stick to TAS on input
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
2023-01-03 20:08:25 +01:00
german77 80bcc18788 service: nifm: Initialize request state 2023-01-01 20:58:08 -06:00
german77 ebd811b535 service: nifm: Match documentation names 2023-01-01 20:58:01 -06:00
Merry bee395d2f0 vfs: Replace cstr concat with char concat 2023-01-01 18:52:02 +00:00
bunnei 05c709bebe core: hid: emulated_console: Avoid a crash if frontend does not configure touch_from_button_maps. 2022-12-30 00:14:53 -08:00
gidoly 10eaf31af3
Revert "k_page_group: synchronize" 2022-12-29 17:39:42 +09:00
ameerj b0722591c9 hle_ipc: Use thread_local ReadBuffer 2022-12-28 18:46:54 -05:00
ameerj a1490d77ac hle_ipc: Rename ReadBufferSpan to ReadBuffer 2022-12-28 18:46:54 -05:00
ameerj 59c0f85407 hle_ipc: Rename ReadBuffer to ReadBufferCopy
Indicates explicitly that a copy is occurring
2022-12-28 18:46:54 -05:00
ameerj 7c1bf68bb4 bsd: Use std::span for read payloads
Allows the use of HLERequestContext::ReadBufferSpan
2022-12-28 18:46:54 -05:00
ameerj f517f82416 nvdrv: Use std::span for inputs
Allows the use of HLERequestContext::ReadBufferSpan
2022-12-28 18:46:53 -05:00
ameerj e7032d9e64 hidbus: Use ReadBufferSpan 2022-12-28 18:46:53 -05:00
bunnei 60419dd35e
Merge pull request #9504 from liamwhite/pg2
k_page_group: synchronize
2022-12-28 17:28:31 -05:00
ameerj 32d01a39b0 nvflinger: Split Parcel class into InputParcel and OutputParcel
The usages of the Parcel class were already unique to either Read or Write operations.
Avoids needing a vector of the input payload for the InputParcel use-case, instead it can remain as a span.
2022-12-25 17:19:10 -05:00
ameerj 7ffd624248 service: Use ReadBufferSpan where it is trivial to do so 2022-12-25 17:04:02 -05:00
MonsterDruide1 bc4126acd7 TAS: Increase accuracy of Stick inputs 2022-12-25 21:49:09 +01:00
Liam 28d9c30861 k_page_table: remove HACK_OpenPages/ClosePages 2022-12-25 13:43:49 -05:00
ameerj fbc375f0de fsp_srv: Use ReadBufferSpan 2022-12-25 13:21:15 -05:00
ameerj 9349f06963 hle_ipc: Add ReadBufferSpan function
Returns a std::span to the buffer address, rather than create a copy of the memory into a std::vector
2022-12-25 13:20:59 -05:00
Liam 3392fdac9b k_page_group: synchronize 2022-12-25 12:55:21 -05:00
liamwhite c6767704fb
Merge pull request #9496 from liamwhite/shm3
kernel: workaround static shared memory initialization
2022-12-25 12:51:16 -05:00
Liam 99eccf581e kernel: workaround static shared memory initialization 2022-12-23 13:40:30 -05:00
Liam 80670a5b6c time: add LockFreeAtomicType 2022-12-21 22:36:55 -05:00
liamwhite 1b11e0f0d3
Merge pull request #9463 from liamwhite/manager-events
EmuThread: refactor
2022-12-20 09:10:41 -05:00
Liam c770f25ccb kernel: remove TimeManager 2022-12-18 20:21:24 -05:00
Liam 67c0d714c5 kernel: add KHardwareTimer 2022-12-18 16:37:19 -05:00
german77 79f1f326c7 service: nfc: Silence ListDevices 2022-12-18 11:57:33 -06:00
bunnei 48108a8c9b
Merge pull request #9456 from german77/virtual_gamepad
input_common: Add virtual gamepad
2022-12-17 17:16:13 -08:00
Liam d3123079e8 EmuThread: refactor 2022-12-17 16:26:24 -05:00
liamwhite 4faea2bbf4
Merge pull request #9452 from ameerj/hle-read-buffer-resreve
hle_ipc: Refactor ReadBuffer to set buffer size upon initialization
2022-12-17 10:21:30 -05:00
german77 243404bf34 input_common: Add virtual gamepad 2022-12-16 18:26:11 -06:00
liamwhite bbb202ceed
Merge pull request #6354 from ogniK5377/device-name
Set: Allow setting device nickname
2022-12-16 14:05:00 -05:00
liamwhite 789da737af
Merge pull request #9450 from ameerj/hle-ipc-vector-reserve
hle_ipc: Reserve vectors before populating
2022-12-16 11:57:48 -05:00
ameerj b1d633532f hle_ipc: Refactor ReadBuffer to set buffer size upon initialization
Initializing the vector size during initialization is more efficient than a later call to resize()
2022-12-15 23:22:11 -05:00
ameerj 12c0f682e6 hle_ipc: Reserve vectors before populating 2022-12-15 22:30:42 -05:00
Narr the Reg 20cbf6f3db kernel: svc: Fix duplicated InfoType enum 2022-12-15 14:18:30 -06:00
Narr the Reg dca4f0687a kernel: process: Implement GetFreeThreadCount
Used by Just Dance® 2023 Edition
2022-12-15 13:44:21 -06:00
liamwhite 3ff7a5de1a
Merge pull request #7410 from Nefsen402/wayland-fixes
Wayland fixes
2022-12-15 12:05:01 -05:00
bunnei beba9c9b61
Revert "hle: service: audio: Use default service thread." 2022-12-14 14:57:33 -08:00
Chloe Marcec c5f519e1e4 Set: Allow setting device nickname 2022-12-13 19:54:17 -05:00
Alexander Orzechowski 09e3029c11 gl_device: Use a more robust way to use strict context mode
Instead of checking a environment variable which may not actually
exist or is just wrong, ask QT if it's running on the wayland
platform.
2022-12-13 15:01:51 -05:00
bunnei 339a37f8cb
Merge pull request #9398 from liamwhite/fail
general: improve handling of system startup failure
2022-12-12 14:37:42 -08:00
Mai d5684dbe7d
Merge pull request #9415 from liamwhite/dc
memory: correct semantics of data cache management operations
2022-12-11 21:09:31 +00:00
Liam ed37192441 memory: correct semantics of data cache management operations 2022-12-11 12:46:34 -05:00
Liam 985ed1e160 memory: remove DEBUG_ASSERT pointer test 2022-12-10 13:02:38 -05:00
Salvage c586ac9be2
Remove the lock entirely as per PR discussion
Correctly unlock mutex before its destruction

As per https://en.cppreference.com/w/cpp/thread/mutex/~mutex destroying a locked mutex is undefined behavior and MSVC++ decides to throw in this case

Swap out unique for scoped lock and readd comment
2022-12-09 16:39:59 +01:00
Liam 9704acb982 general: improve handling of system startup failure 2022-12-06 16:13:42 -05:00
merry e1f5f4bdea
Merge pull request #9370 from liamwhite/break-unmapped
core: add option to break on unmapped access
2022-12-06 20:20:20 +00:00
liamwhite 4b7e73e0a6
Merge pull request #9392 from lioncash/reporter
reporter: Eliminate undefined behavior in SaveErrorReport
2022-12-06 11:27:00 -05:00
liamwhite d8534ea140
Merge pull request #9390 from lioncash/keyboard
applets: Extract callback types into aliases
2022-12-06 11:26:53 -05:00
liamwhite bbdb6d391e
Merge pull request #9389 from lioncash/emumove
emulated_console/emulated_controller: std::move ParamPackage instances where applicable
2022-12-06 11:26:46 -05:00
liamwhite a86af1b776
Merge pull request #9386 from lioncash/init
kernel: Ensure relevant class members are always initialized on construction
2022-12-06 11:26:38 -05:00
liamwhite 04779b3d2a
Merge pull request #9369 from german77/mifare
service: nfc: Implement mifare service
2022-12-05 22:17:32 -05:00
Lioncash eadc1ae1e7 reporter: Pass by const reference where applicable
Same behavior, but without memory churn.
2022-12-05 21:48:42 -05:00
Lioncash e7f9f58fa4 reporter: Eliminate undefined behavior in SaveErrorReport
The optionals are unconditionally dereferenced when setting the custom
error text, and in a few cases this function is called using the default
value of the optionals.

This means we'd be dereferencing uninitialized storage.

Since they're used unconditionally, we can use value_or to set a default
when storage is uninitialized.
2022-12-05 21:31:34 -05:00
Lioncash fedd857054 applets/controller: Use aliases for callbacks 2022-12-05 19:06:04 -05:00
Lioncash d8da9a2afd applets/error: Use aliases for callbacks 2022-12-05 19:06:04 -05:00
Lioncash 2b40cdf04f applets/mii_edit: Use aliases for callbacks 2022-12-05 19:06:04 -05:00
Lioncash a84676c2aa applets/profile_select: Use aliases for callbacks
Deduplicates callback definitions and situates it in one place.
2022-12-05 19:06:04 -05:00
Lioncash e26c86a6e7 applets/web_browser: Use aliases for callbacks
Deduplicates a lot of long callback declarations
2022-12-05 19:06:04 -05:00
Lioncash 9bbb77637e applets/software_keyboard: Use aliases for callbacks
Deduplicates really long std::function declarations to make the
interface nicer to read.
2022-12-05 19:06:01 -05:00
Lioncash e4a16f50ef emulated_controller: Remove unused parameter in GetMappedDevices()
This isn't used, so it can be removed to make the function a little
nicer.
2022-12-05 18:27:18 -05:00
Lioncash 87543b9dea emulated_controller: Use std::move() in GetMappedDevices()
Avoids churning allocations in a loop.
2022-12-05 18:27:15 -05:00
Lioncash 7bf4b45349 emulated_console: Amend cast in SetTouch()
id is an int value, not a u32.
2022-12-05 18:15:23 -05:00
Lioncash 4255e30722 emulated_console: std::move() ParamPackages and callbacks where applicable 2022-12-05 18:15:19 -05:00
Lioncash efa8711bf3 kernel/k_shared_memory: Ensure device_memory is always initialized 2022-12-05 15:27:57 -05:00
Lioncash c3fd211b43 kernel/k_memory_block: Ensure members are always initialized 2022-12-05 15:27:47 -05:00
Lioncash dcca650599 kernel/physical_core: Ensure is_interrupted is always initialized 2022-12-05 15:19:37 -05:00
Lioncash dddc9bb8f1 kernel/thread: Ensure stack_top and argument are always initialized 2022-12-05 15:19:36 -05:00
Lioncash 4769d798f9 kernel/kernel: Ensure shutdown threads are always initialized 2022-12-05 15:19:36 -05:00
liamwhite 3b19f741bd
Merge pull request #6833 from abouvier/unbundle
cmake: prefer system libraries
2022-12-05 12:26:09 -05:00
Mai a52d0b82a6
Merge pull request #9381 from liamwhite/uninit
service_thread: fix uninitialized memory usage
2022-12-04 22:30:16 +00:00
Liam cec3a3cd5a service_thread: fix uninitialized memory usage 2022-12-04 16:02:24 -05:00
liamwhite 3b9db85646
Merge pull request #9232 from bunnei/audio-default-thread
hle: service: audio: Use default service thread.
2022-12-04 15:31:40 -05:00
liamwhite 522e7c5663
Merge pull request #9273 from ameerj/per-game-profile
Configuration: Add per-game input profiles
2022-12-04 13:38:01 -05:00
Alexandre Bouvier 8e17b5469f cmake: prefer system libraries 2022-12-04 17:09:25 +01:00
liamwhite 02b10a6e4d
Merge pull request #9374 from liamwhite/externals
externals: update dynarmic, SDL2
2022-12-04 10:44:12 -05:00
Liam 6d2c597371 externals: update dynarmic, SDL2 2022-12-04 10:12:26 -05:00
bunnei f77cc6c412
Merge pull request #9344 from liamwhite/null
video_core: add null backend
2022-12-03 11:23:25 -08:00
liamwhite 75e16547f8
Merge pull request #9300 from ameerj/pch
CMake: Use precompiled headers to improve compile times
2022-12-03 14:10:06 -05:00
liamwhite 22aff09b33
Merge pull request #9289 from liamwhite/fruit-company
general: fix compile for Apple Clang
2022-12-03 12:09:21 -05:00
Matías Locatti c043ba8467
Merge pull request #9303 from liamwhite/new-vulkan-init
Vulkan: update initialization
2022-12-02 18:32:54 -03:00
Liam 6072b22a0b core: add option to break on unmapped access 2022-12-02 08:25:45 -05:00
liamwhite d8bd52c6f1
Merge pull request #9348 from Morph1984/when-the-network-is-down
service: nifm: Update stubs for Submit/GetRequestState/GetResult
2022-12-01 22:14:43 -05:00
Narr the Reg a4725bcb73 service: nfc: Implement mifare service 2022-12-01 20:43:59 -06:00