Commit Graph

15995 Commits

Author SHA1 Message Date
Lioncash 4eb73ab98a hid/gesture: Ensure all ID arrays are initialized
Makes for deterministic initial state.
2021-05-18 03:39:21 -04:00
Lioncash 359b12ece1 hid/gesture: Make Point a template
We can now use this in a generic context to reuse it with the finger
position.
2021-05-18 03:39:18 -04:00
Lioncash 83a444ddf7 hid/gesture: Replace x,y members of GestureState with a Point
Simplifies assignments.
2021-05-18 03:32:42 -04:00
Lioncash ea1cb30004 hid/gesture: Add default comparators to Point
Simplifies some comparisons.
2021-05-18 03:32:42 -04:00
Lioncash 861039484d hid/gesture: Rename Points to Point
This only represents a single point
2021-05-18 03:32:38 -04:00
bunnei 7d0ec35aaa Merge pull request #6322 from ameerj/fast-null-buffer
buffer_cache: Ensure null buffers cannot take the fast uniform bind path
2021-05-17 15:45:36 -07:00
lat9nq d6c9f6acc5 general: Demote custom_rtc to regular setting 2021-05-17 15:54:30 -04:00
Mat M 440443ecd4 Merge pull request #6328 from Morph1984/enforce-c4715
CMakeLists: Enforce C4715 on MSVC
2021-05-17 13:20:58 -04:00
Morph 49378192aa CMakeLists: Enforce C4715 on MSVC
This is similar to -Werror=return-type
2021-05-17 03:48:58 -04:00
Morph 313e1b0f8f configure_debug: FIx duplicate labels
Duplicate labels were unintentionally introduced due to copy-paste. This silences the compilation warning produced by the presence of these duplicates.
2021-05-16 23:32:51 -04:00
Morph 7faacec6a4 yuzu/main: Fix version info in logging and about dialog 2021-05-16 22:17:17 -04:00
bunnei baa0060cd7 Merge pull request #6319 from Morph1984/no-install-base
main: Prevent installing base titles into NAND
2021-05-16 16:33:33 -07:00
ameerj 53c68f6bb3 buffer_cache: Ensure null buffers cannot take the fast uniform bind path
Fixes a crash in New Pokemon Snap
2021-05-16 07:43:40 -04:00
bunnei 91cae39587 Merge pull request #6284 from ameerj/shantae-fix
nvflinger: Create layers when they are queried but not found
2021-05-16 01:45:14 -07:00
bunnei 1e40ee003f Merge pull request #6296 from lioncash/shadow-error
core: Make variable shadowing a compile-time error
2021-05-16 01:35:46 -07:00
bunnei eaac594117 Merge pull request #6307 from Morph1984/fix-response-push-size
nifm, ssl: Fix incorrect response sizes
2021-05-16 01:32:04 -07:00
Morph c3bb08ad31 main: Prevent installing base titles into NAND
Many users have been installing their base titles into NAND instead of adding them into the games list. This prevents users from installing any base titles and warns the user about the action.
2021-05-16 04:13:57 -04:00
Morph c4f16c8e14 hle_ipc: unsigned -> u32
This is more concise and consistent with the rest of the codebase.
2021-05-16 04:11:00 -04:00
Morph 29ce6e48ed hle_ipc: Add a getter for PID 2021-05-16 04:10:42 -04:00
Lioncash eeae5217ba core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
2021-05-16 03:43:16 -04:00
bunnei 37e988258a Merge pull request #6316 from ameerj/title-fix
main: Add running title's version to window name on EA/mainline
2021-05-15 22:40:35 -07:00
lat9nq 04060711c2 configuration: Add CPU tab to game properties
Allows setting CPU accuracy to Accurate or Unsafe per-game, as well as
the accuracy options for Unsafe. Debug is not allowed here as a per-game
CPU accuracy.
2021-05-16 01:31:42 -04:00
bunnei 10ef4a9142 Merge pull request #6299 from bunnei/ipc-improvements
Various improvements to IPC and session management
2021-05-15 22:30:21 -07:00
bunnei fb753f4d8d Merge pull request #6289 from ameerj/oob-blit
texture_cache: Handle out of bound texture blits
2021-05-15 21:32:37 -07:00
Morph 0fdff05afa nifm, ssl: Fix incorrect response sizes 2021-05-16 00:20:48 -04:00
lat9nq 4158f88b49 configuration: Simplify applying per-game settings
Originally, every time we add a per-game setting, we'd have to guard for
it when setting it on the global config, and use a specific function to
do it for the per-game config.

This moves the global check into the ApplyPerGameSetting function so
that we can use it for changing both the global and per-game states.
Less work for the programmer.
2021-05-15 22:59:38 -04:00
lat9nq 11b43840a9 configuration_shared: Add some comments
Monke brain can't remember what all of these does a year later.
2021-05-15 22:07:20 -04:00
lat9nq 065b3eb53a general: Make CPU accuracy and related a Settings::Setting
Required to make CPU accuracy and unsafe settings available to use as a
per-game setting.
2021-05-15 20:46:48 -04:00
ameerj 453e90ef6f perf_stats: Rework FPS counter to be more accurate
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case.

This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics.
The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values.

The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-15 20:34:20 -04:00
ameerj 4981aa10aa main: Add title's version to window name on EA/mainline
Fixes the missing title version number on EA/mainline builds which override the title bar string.
2021-05-15 16:55:30 -04:00
german77 b79310def9 input_common: Implement SDL motion 2021-05-15 08:56:58 -05:00
german77 2d3df5d3f4 input_common: Fix crash when controller disconnects 2021-05-15 08:27:19 -05:00
german77 b41d05a12c input_common: Rewrite sdl analog mapping 2021-05-14 21:17:08 -05:00
german77 eac788499b input_common: Sanitize motion data 2021-05-13 13:41:32 -05:00
bunnei 5568354451 Merge pull request #6301 from Morph1984/ssl-ImportClientPki
ssl: Stub Import(Client/Server)Pki
2021-05-12 22:11:19 -07:00
Morph d1c74c3444 Merge pull request #6298 from Kewlan/toggled-show-add-on-refresh
configure_ui: Call RequestGameListUpdate when toggling "Show Add-Ons Column"
2021-05-12 21:06:04 -04:00
Morph 46f773ad5c ssl: Stub Import(Client/Server)Pki
- Used in JUMP FORCE Deluxe Edition
2021-05-12 21:04:13 -04:00
Morph 27c2d51a53 Merge pull request #6267 from german77/gestureRewrite
hid: Improve hardware accuracy of gestures
2021-05-12 09:17:23 -04:00
bunnei 9d01b31e3f common: tree: Avoid a nullptr dereference. 2021-05-11 15:40:20 -07:00
bunnei 006a51c86b hle: kernel: hle_ipc: Fix outgoing IPC response size calculation. 2021-05-11 12:27:43 -07:00
bunnei 627eaf8c0e WORKAROUND: temp. disable session resource limits while we work out issues 2021-05-11 10:51:39 -07:00
bunnei bb77b5d79f WORKAROUND: Do not use slab heap while we track down issues with resource management. 2021-05-11 10:27:18 -07:00
bunnei 2a7b1c1424 audren 2021-05-11 10:24:53 -07:00
bunnei a21dff4980 core: hle: ipc_helpers: Fix cast on raw_data_size calculation. 2021-05-10 20:34:38 -07:00
bunnei 1c07b56283 hle: service: sm: Add TIPC support.
- Fixes our error checking of names as well.
2021-05-10 20:34:38 -07:00
bunnei 232102c794 hle: kernel: hle_ipc: Improve IPC code and add initial support for TIPC.
- Fixes our move handles implementation to actually move objects.
- Simplifies the traditional IPC path.
2021-05-10 20:34:38 -07:00
bunnei 0f3b6928ab hle: service: sm: GetService: Reserve session resource when we create a KSession. 2021-05-10 20:34:38 -07:00
bunnei fe91306d87 hle: service: Add support for dispatching TIPC requests. 2021-05-10 20:34:38 -07:00
bunnei 80d920e464 hle: service: Implement IPC::CommandType::Close.
- This was not actually closing sessions before.
2021-05-10 20:34:38 -07:00
bunnei e9d3612085 hle: service: sm: Use RegisterNamedService to register the service. 2021-05-10 20:34:38 -07:00
bunnei 11413d71ad hle: service: sm: Improve Initialize implementation. 2021-05-10 20:34:38 -07:00
bunnei 6e284d951b hle: kernel: svc: Update ConnectToNamedPort to use new CreateNamedServicePort interface. 2021-05-10 20:34:38 -07:00
bunnei 777e7c52ba hle: kernel: Implement named service ports using service interface factory.
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
2021-05-10 20:34:38 -07:00
bunnei 14e52144e2 hle: kernel: KSession: Improve implementation of CloneCurrentObject. 2021-05-10 20:33:53 -07:00
bunnei 1e211a1b15 hle: service: sm: Increase point buffer size. 2021-05-10 15:43:42 -07:00
bunnei 66c7c7e5ab hle: ipc_helpers: Reserve session resource when we create a KSession. 2021-05-10 15:42:46 -07:00
bunnei 2c9d6156d2 hle: kernel: KClientPort: Cleanup comment format. 2021-05-10 15:41:46 -07:00
bunnei 29a31e30db hle: ipc: Add declarations for TIPC. 2021-05-10 15:05:10 -07:00
bunnei 4a781928dd hle: kernel: Further cleanup and add TIPC helpers. 2021-05-10 15:05:10 -07:00
bunnei ae86003503 hle: ipc_helpers: Update IPC response generation for TIPC. 2021-05-10 15:05:10 -07:00
Kewlan 182b56f54e configure_ui: Call RequestGameListUpdate when toggling "Show Add-Ons Column" 2021-05-10 18:49:30 +02:00
Lioncash 41852fb7e7 parent_of_member: Make sign conversion explicit in OffsetOfImpl()
Previously these conversions were implicit and causing quite a few
warnings on clang.
2021-05-10 08:07:33 -04:00
bunnei 6997b030b1 Merge pull request #6291 from lioncash/kern-shadow
kernel: Eliminate variable shadowing
2021-05-09 20:15:00 -07:00
german77 1b8951c31b kernel: Delete unused files 2021-05-09 11:15:31 -05:00
Lioncash e019da0487 kernel: Eliminate variable shadowing
Now that the large kernel refactor is merged, we can eliminate the
remaining variable shadowing cases.
2021-05-08 12:33:26 -04:00
bunnei 80460d421e Merge pull request #6266 from bunnei/kautoobject-refactor
Kernel Rework: Migrate kernel objects to KAutoObject
2021-05-07 23:30:17 -07:00
ameerj fc2626f02c texture_cache: Handle out of bound texture blits
Some games interleave a texture blit using regions which are out-of-bounds. This addresses the interleaving to avoid oob reads from the src texture.
2021-05-07 22:14:21 -04:00
bunnei e75a9872ea Merge pull request #6287 from lioncash/ldr-copy
ldr: Simplify memory copy within LoadNro()
2021-05-07 09:46:31 -07:00
Lioncash 6890201733 ldr: Simplify memory copy within LoadNro()
We can use the dedicated memory function for performing copies instead
of reading into a temporary buffer and then immediately writing it back
out to memory.

Eliminates a bit of heap memory churn.
2021-05-06 19:18:14 -04:00
ameerj 16528cb361 nvflinger: Create layers when they are queried but not found
Fixes Shantae softlock on boot.
2021-05-06 11:20:52 -04:00
bunnei afdbfb884c hle: kernel: KPageTable: CanContain should not be constexpr. 2021-05-05 16:40:55 -07:00
bunnei 14cb6883db hle: kernel: Move slab resource counts to Kernel. 2021-05-05 16:40:54 -07:00
bunnei 720906d0a5 fixup! hle: kernel: Migrate KSharedMemory to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei 37338198be fixup! hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei b784918391 fixup! common: bit_util: Add BIT macro. 2021-05-05 16:40:54 -07:00
bunnei 636dd1917e fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei 0cbeafef3e fixup! hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:54 -07:00
bunnei 4ebb8f0dfe kernel: svc: Remove unused RetrieveResourceLimitValue function. 2021-05-05 16:40:54 -07:00
bunnei 89966df98c hle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES. 2021-05-05 16:40:54 -07:00
bunnei fd11e0722b fixup! hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:54 -07:00
bunnei 7341a973df fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei 464b640058 fixup! hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei e2e26f8299 common: parent_of_member: Fix build for OffsetOf(). 2021-05-05 16:40:54 -07:00
bunnei 396379c2c0 fixup! common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC. 2021-05-05 16:40:54 -07:00
bunnei 3fa3fa47e5 fixup! hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei a50cc0c3f8 fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei 9536ae2f2e fixup! hle: kernel: Add initial impl. of KLinkedList. 2021-05-05 16:40:54 -07:00
bunnei a4fc003902 fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:54 -07:00
bunnei 8ea927fb3b fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:54 -07:00
bunnei 0dfa7a1417 fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei dc0abc7315 fixup! hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei e04364fcf4 fixup! hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei a257c4971d fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:53 -07:00
bunnei 2a28e9e465 fixup! hle: kernel: Add initial impl. of KAutoObjectWithListContainer. 2021-05-05 16:40:53 -07:00
bunnei adcfeee40f fixup! hle: kernel: Add initial impl. of KAutoObjectWithListContainer. 2021-05-05 16:40:53 -07:00
bunnei 5786975b49 fixup! hle: kernel: Add initial impl. of KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei 335794e7ec fixup! hle: kernel: Add initial impl. of KAutoObject. 2021-05-05 16:40:53 -07:00
bunnei 05522ebecb fixup! hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:53 -07:00
bunnei 5b894b28d6 common: Rename NON_COPYABLE/NON_MOVABLE with YUZU_ prefix. 2021-05-05 16:40:53 -07:00
bunnei 4149670ee8 fixup! hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:53 -07:00
bunnei 66d9f319ba fixup! hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:53 -07:00
bunnei 77850c6c56 fixup! hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory. 2021-05-05 16:40:53 -07:00
bunnei 4c54ffc1f6 hle: kernel: svc: ConnectToNamedPort: Use KHandleTable::Reserve. 2021-05-05 16:40:53 -07:00
bunnei 47224d3864 hle: kernel: Migrate to KHandleTable. 2021-05-05 16:40:53 -07:00
bunnei 4054c8dd2c hle: kernel: KClassToken: Ensure class tokens are correct. 2021-05-05 16:40:53 -07:00
bunnei 95fbbf3041 hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory. 2021-05-05 16:40:52 -07:00
bunnei ad048de3d6 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -07:00
bunnei 796dddf78f hle: kernel: Remove deprecated Object class. 2021-05-05 16:40:52 -07:00
bunnei 90e23002fa hle: kernel: Do not shutdown twice on emulator close. 2021-05-05 16:40:52 -07:00
bunnei 44c8d9206c hle: kernel: Cleanup shutdown of persistent kernel objects. 2021-05-05 16:40:52 -07:00
bunnei d6844cf75f hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei 2bc45b4a13 hle: kernel: Migrate KServerPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei 9f1abd8188 hle: kernel: Migrate KClientPort to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei 944eb14d69 hle: kernel: HandleTable: Remove deprecated APIs. 2021-05-05 16:40:52 -07:00
bunnei 22a67a4627 hle: kernel: Migrate KResourceLimit to KAutoObject. 2021-05-05 16:40:52 -07:00
bunnei d4b1153e1b hle: kernel: svc: Migrate WaitSynchronization. 2021-05-05 16:40:51 -07:00
bunnei 3a07aeba02 hle: kernel: svc: Use new handle table API for Process. 2021-05-05 16:40:51 -07:00
bunnei bf274faa22 hle: kernel: Migrate KTransferMemory to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei 83b96b7264 hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei 7d0ee9a1b1 hle: kernel: svc: Migrate GetThreadContext, GetThreadCoreMask. 2021-05-05 16:40:51 -07:00
bunnei 98ea7b9b50 hle: kernel: svc: Migrate GetProcessId, CancelSynchronization, SetThreadActivity. 2021-05-05 16:40:51 -07:00
bunnei 7e716f100d hle: kernel: KThread: Remove incorrect resource release. 2021-05-05 16:40:51 -07:00
bunnei b6c0ce8781 hle: kernel: svc_results: Update naming.. 2021-05-05 16:40:51 -07:00
bunnei 635fc8bda3 hle: kernel: KThread: Add missing resource hint release. 2021-05-05 16:40:51 -07:00
bunnei 617803fb5d hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject. 2021-05-05 16:40:51 -07:00
bunnei 6a42358706 hle: ipc_helpers: Add methods for copy/move references. 2021-05-05 16:40:51 -07:00
bunnei a317bad4ce hle: kernel: Move slab heaps to their own container. 2021-05-05 16:40:51 -07:00
bunnei 715978756e hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps. 2021-05-05 16:40:51 -07:00
bunnei 2cb4c9d7b2 hle: kernel: Move slab heap management to KernelCore. 2021-05-05 16:40:51 -07:00
bunnei 9f82c577d0 hle: kernel: Ensure all kernel objects with KAutoObject are properly created. 2021-05-05 16:40:51 -07:00
bunnei 986245ba10 hle: kernel: Use unique_ptr for suspend and dummy threads. 2021-05-05 16:40:50 -07:00
bunnei 949231d69c hle: kernel: Migrate KEvent to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei 11f9080d2e hle: kernel: Migrate KSharedMemory to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei 7a6bfbde24 hle: kernel: Migrate KProcess to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei 8b224f05c9 hle: kernel: Refactor IPC interfaces to not use std::shared_ptr. 2021-05-05 16:40:50 -07:00
bunnei a4a27a1ef2 hle: kernel: Migrate more of KThread to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei 746f99e919 hle: kernel: svc: Migrate GetThreadPriority, StartThread, and ExitThread. 2021-05-05 16:40:50 -07:00
bunnei ac779a83fc hle: kernel: svc: Migrate CreateThread. 2021-05-05 16:40:50 -07:00
bunnei 773580b9f7 hle: kernel: Migrate idle threads. 2021-05-05 16:40:50 -07:00
bunnei 2125abf6d9 hle: kernel: Migrate KThread to KAutoObject. 2021-05-05 16:40:50 -07:00
bunnei d602286355 hle: kernel: Add initial impl. of slab setup. 2021-05-05 16:40:50 -07:00
bunnei 07939c59a6 hle: kernel: Refactor out various KThread std::shared_ptr usage. 2021-05-05 16:40:50 -07:00
bunnei 0cff50a7b5 core: Defer CoreTiming initialization. 2021-05-05 16:40:50 -07:00
bunnei 4aebdea6cf core: memory: Add a work-around to allocate and access kernel memory regions by vaddr. 2021-05-05 16:40:50 -07:00
bunnei b477e9e11b common: common_funcs: Add Size helper function. 2021-05-05 16:40:49 -07:00
bunnei d2817d3d9b hle: kernel: Add initial impl. of KLinkedList. 2021-05-05 16:40:49 -07:00
bunnei 50f0ec9849 common: bit_util: Add BIT macro. 2021-05-05 16:40:49 -07:00
bunnei db53115ed2 hle: kernel: Add initial impl. of KSlabAllocated. 2021-05-05 16:40:49 -07:00
bunnei a7271e7c71 hle: kernel: Add initial impl. of KAutoObjectWithListContainer. 2021-05-05 16:40:49 -07:00
bunnei 7b7a948b80 hle: kernel: Add initial impl. of KAutoObject. 2021-05-05 16:40:49 -07:00
bunnei fbcac8642e common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC. 2021-05-05 16:40:49 -07:00
bunnei 092b91aeb7 common: common_funcs: Add helper macros for non-copyable and non-moveable.
- Useful for scenarios where we do not want to inherit from NonCopyable.
2021-05-05 16:40:49 -07:00
bunnei 9a4f071b44 Merge pull request #6279 from ogniK5377/nvhost-prof
nvdrv: /dev/nvhost-prof-gpu for production
2021-05-05 16:16:13 -07:00
bunnei 145567ab66 Update src/core/hle/service/nvdrv/interface.cpp
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-05-05 16:16:02 -07:00
german77 0ea00daa81 hid: Improve hardware accuracy of gestures 2021-05-05 10:13:09 -05:00
Lioncash 11518e5df6 service: Remove unused class variables
Prevents some warnings from occurring.
2021-05-05 01:32:28 -04:00
Lioncash 15daa2cecd service: Resolve cases of member field shadowing
Now all that remains is for kernel code to be 'shadow-free' and then
-Wshadow can be turned into an error.
2021-05-04 04:38:38 -04:00
bunnei 0dc6b408ac Merge pull request #6278 from lioncash/misc-shadow
core: Resolve misc straggler cases of variable shadowing
2021-05-03 16:04:28 -07:00
bunnei 0a7fe85409 Merge pull request #6275 from german77/mousefocus
input_common: Release mouse buttons on out of focus
2021-05-03 12:50:19 -07:00
Lioncash 84b656fbbd core: Resolve misc cases of variable shadowing
Resolves shadowing warnings that aren't in a particularly large
subsection of core. Brings us closer to turning -Wshadow into an error.

All that remains now is for cases in the kernel (left untouched for now
since a big change by bunnei is pending), and a few left over in the
service code (will be tackled next).
2021-05-03 01:19:13 -04:00
Chloe Marcec da763391dc nvdrv: /dev/nvhost-prof-gpu for production
While we're at it, we can fix the is_initialized error code.
This fixes the crashes on Shante
2021-05-03 14:39:03 +10:00
german77 86f0502456 hid: Fix touch not initializing properly if disabled 2021-05-02 21:27:15 -05:00
german77 1562858963 input_common: Release mouse buttons on out of focus 2021-05-02 19:08:33 -05:00
bunnei 887972a91b Merge pull request #6269 from lioncash/file-shadow
file_sys: Resolve cases of variable shadowing
2021-05-02 15:12:07 -07:00
Morph 37f456bb09 Merge pull request #6263 from Kewlan/folder-swap-expand-state
game_list: Fix dir move up/down expand state
2021-05-02 07:43:45 -04:00
bunnei 8463047aa7 Merge pull request #6265 from Morph1984/snap-save-fix
service: filesystem: Return proper error codes for CreateFile
2021-05-02 00:45:18 -07:00
Lioncash ab38371888 file_sys: Resolve cases of variable shadowing
Brings us closer to enabling -Wshadow as an error in the core code.
2021-05-02 02:59:57 -04:00
bunnei eee473db66 Merge pull request #6261 from Kewlan/game-list-filter-fix
game_list: Update filter results when removing directories
2021-05-01 09:14:10 -07:00
Morph eb59a33d4e service: filesystem: Return proper error codes for CreateFile
This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists).

This fixes saving and the loading of existing saves in New Pokemon Snap
2021-05-01 09:33:00 -04:00
german77 e367b3a557 Disable touch if setting is not enabled 2021-04-30 19:28:21 -05:00
bunnei 305bb0cf42 Merge pull request #6257 from Morph1984/fix-use-after-free-webapplet
applets/web: Fix a use-after-free when passing in the URL string
2021-04-30 14:48:32 -07:00
bunnei 1838d41120 Merge pull request #6243 from german77/GCresetOrigin
input_common: Reset GC sticks center by measuring multiple packets
2021-04-30 12:02:05 -07:00
Kewlan 9098ceeef3 game_list: Fix dir move up/down expand state 2021-04-30 12:18:38 +02:00
bunnei 094926f8b9 Merge pull request #6226 from german77/sevensix
hid: Implement SevenSixAxis and ConsoleSixAxisSensor
2021-04-29 22:06:57 -07:00
Kewlan 8522d5848f game_list: Update filter results when removing directories 2021-04-30 00:05:23 +02:00
Morph f4f67c448a yuzu: config: Silence narrowing conversion warning on MSVC 2021-04-28 22:42:56 -04:00
Morph d93fa45cf8 applets/web: Fix a use-after-free when passing in the URL string
The URL string was being deleted before being used, leading to a use-after-free occurring when it is used afterwards.

Fix this by taking the string by const ref to extend its lifetime, ensuring it doesn't get deleted before use.
2021-04-28 12:34:28 -04:00
Morph 36e7e886d0 yuzu: main: Silence type conversion warning on MSVC 2021-04-28 12:22:41 -04:00
Lioncash 41c7ce33b6 loader: Resolve instances of variable shadowing
Eliminates variable shadowing cases across all the loaders to bring us
closer to enabling variable shadowing as an error in core.
2021-04-27 12:48:15 -04:00
german77 b91b81a2a3 address comments 2021-04-26 22:07:16 -05:00
german77 7d6d399f26 input_common: Reset GC sticks center by measuring multiple packets 2021-04-26 18:34:00 -05:00
bunnei d2ac0ce0c7 Merge pull request #6246 from lioncash/shadow
service: Eliminate cases of member variable shadowing
2021-04-26 16:19:49 -07:00
bunnei 2ea830d780 Merge pull request #6236 from Morph1984/swkbd-button-hint-scaling
applets/swkbd: Fix software keyboard button hint scaling
2021-04-26 14:40:37 -07:00
A-w-x 116d1bd6bf gl_device: Intel: Disable texture view formats workaround on mesa 2021-04-26 18:14:10 +02:00
Lioncash b25f44f4d7 service: Eliminate cases of member shadowing
Resolves a few localized instances of member variable shadowing. Brings
us a little closer to turning shadowing warnings into errors.
2021-04-26 09:39:49 -04:00
bunnei d333828ae1 Merge pull request #6198 from Kewlan/favorite-games
game_list: Mark games as favorite to make them appear at the top.
2021-04-25 23:33:44 -07:00
bunnei 0366163ef3 Merge pull request #6237 from ameerj/nvdec-end-fix
nvhost_vic: Fix device closure
2021-04-25 23:05:58 -07:00
Morph 9e57d03087 config: Add new keyboard bindings
Changes the keyboard bindings to be based on RPCS3's tried and true keyboard bindings.
2021-04-25 07:26:57 -04:00
ameerj 7d421b1c04 vk_texture_cache: Swap R and B channels of color flipped format
Swaps the Red and Blue channels of the A1B5G5R5_UNORM texture format, which was being incorrectly rendered.
2021-04-24 23:59:42 -04:00
ameerj de494b30d4 nvhost_vic: Fix device closure
Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation.

Also cleans up some of the surrounding code.
2021-04-24 19:22:09 -04:00
Its-Rei 6b2bdb75bd applets/swkbd: Fix software keyboard button hint scaling
Fixes the scaling of the button hints using background images. Now they scale like the rest of the elements.
2021-04-24 13:47:33 -04:00
Mat M dd3655702d Merge pull request #6234 from Morph1984/stub-am
ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
2021-04-24 12:37:34 -04:00
Mat M 5a8ddc5c16 Merge pull request #6235 from german77/ectx_aw
glue: Add ectx:aw service placeholder
2021-04-24 12:37:12 -04:00
german77 9ceb9df088 glue: Add ectx:aw placeholder 2021-04-24 10:50:25 -05:00
bunnei 7f2b5d4e83 Merge pull request #6230 from Morph1984/default-resource-size
program_metadata: Set a default resource size when a NPDM is not present
2021-04-24 02:55:20 -07:00
bunnei 0ecae06ce6 Merge pull request #6227 from lioncash/meta
program_metadata: Explicitly specify copy/move operators/functions
2021-04-23 23:12:44 -07:00
german77 c8845b4fdf hid: Implement SevenSixAxis and ConsoleSixAxisSensor 2021-04-23 22:12:41 -05:00
Morph 7835a7370f ICommonStateGetter: Stub SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled
- Used by Pixel Game Maker Series Werewolf Princess Kaguya
2021-04-23 23:04:22 -04:00
bunnei e4c5b365d5 Merge pull request #6228 from lioncash/semi
lm: Resolve -Wextra-semi warning
2021-04-23 19:59:20 -07:00
bunnei 1903c126dc Merge pull request #6229 from lioncash/unused-var
acc/lbl: Remove unused variables
2021-04-23 15:48:47 -07:00
bunnei 8c0d8b486e Merge pull request #6231 from lioncash/aes
aes_util: Make use of std::span
2021-04-23 11:37:17 -07:00
Morph 0357607044 program_metadata: Set a default resource size when a NPDM is not present
Sets a default size of 0x1FE00000 bytes (510 MiB) for the system_resource_size when a NPDM is not present.
2021-04-23 12:47:31 -04:00
bunnei 97673232fd Merge pull request #6232 from lioncash/alias2
emu_window: unsigned -> u32
2021-04-23 09:26:56 -07:00
Lioncash e19906c9b6 emu_window: Return pair from ClipToTouchScreen() instead of tuple
This is only a 2-tuple, so it can be converted over to the std::pair
class.
2021-04-23 11:21:02 -04:00
Lioncash 19caa4ffd2 emu_window: unsigned -> u32
This is more concise and consistent with the rest of the codebase.
2021-04-23 11:19:32 -04:00
Lioncash 72481cce94 aes_util: Make use of std::span
Allows us to simplify the interface quite a bit as it will handle
contiguous sequences for us.
2021-04-23 09:58:41 -04:00
Lioncash 5bc631a7c5 acc/lbl: Remove unused variables 2021-04-23 09:39:56 -04:00
Lioncash 61f25f6eff lm: Make use of insert_or_assign() in Log()
Avoids unnecessary default construction of an entry in cases where no
entry exists before overwriting the created entry.
2021-04-23 09:27:18 -04:00
Lioncash 0b535a371f lm: Prevent redundant map lookups in Log()
We can perform the lookup and then do the contains check by checking the
end iterator. The benefit of this is that if we *do* find an entry, then
we aren't hashing into the map again to find it.

We can also get rid of an unused std::vector temporary while we're at
it.
2021-04-23 09:24:21 -04:00
Lioncash d9917dd09c lm: Resolve -Wextra-semi warning
Resolves a trivial warning with clang.
2021-04-23 09:20:54 -04:00
Lioncash 596e303d7b program_metadata: Explicitly specify copy/move functions
The generation of the copy assignment operators are deprecated on being
generated when a user-provided destructor is present.

We can explicitly specify that we desire this behavior to keep the class
forward compatible with future standards.
2021-04-23 09:16:17 -04:00
ameerj 26f5049a7e yuzu_cmd: Remove unused resource.h 2021-04-22 22:25:49 -04:00
Morph 9c8242ed3f service: hid: Get transfer memory for InitializeSevenSixAxisSensor 2021-04-22 05:50:46 -04:00
bunnei 9e35805ac8 Merge pull request #6214 from Morph1984/time-fix-kirby-clash
time: Fix GetClockSnapshotFromSystemClockContext
2021-04-21 11:17:58 -07:00
bunnei f2d13bfefb Merge pull request #6219 from lioncash/log-erase
log/backend: Make use of erase_if
2021-04-20 16:07:00 -07:00
bunnei 4dfabbe348 Merge pull request #6218 from lioncash/tcache
texture_cache/util: Fix src being used instead of dst within DeduceBlitImages case
2021-04-20 11:56:40 -07:00
bunnei 2bf74dd3e1 Merge pull request #6207 from lat9nq/sdl-2.0.14
cmake: Use SDL 2.0.14 and fix scope issue
2021-04-20 10:19:03 -07:00
Lioncash 4105a18d21 log/backend: Use in-class initializer for FileBackend
We can also avoid redundant constructions of the same string repeatedly.
2021-04-20 12:57:49 -04:00
Lioncash b34cf1fe34 log/backend: Make use of erase_if
Same behavior, but less verbose.
2021-04-20 12:53:05 -04:00
bunnei ad0eac28a8 Merge pull request #6217 from Morph1984/consistent-writebuffers
general: Write buffers before pushing raw arguments
2021-04-19 20:54:25 -07:00
bunnei 2287809736 Merge pull request #6215 from lioncash/duplicate
npad: Remove duplicated class member variable
2021-04-19 18:12:48 -07:00
Lioncash c81f95a54b texture_cache/util: Fix src being used instead of dst within DeduceBlitImages
This line can only ever be reached if src is null, so dereferencing it
here is a logic bug that slipped through.

Instead, we dereference dst instead which is guaranteed to be valid.
2021-04-19 13:01:50 -04:00
Morph 91aadc6484 general: Write buffers before pushing raw arguments
For consistency with the rest of the service implementations
2021-04-19 12:45:50 -04:00
Lioncash 4874031e26 arp: Use type alias for issue function
Reduces some verbosity and centralizes the function details in one spot.
2021-04-19 12:36:10 -04:00
Lioncash 712a4960a5 arp: Prevent uninitialized read of launch member variable
If anything happened to call arp functions in the wrong order and called
IRegistrar's Issue function before SetApplicationLaunchProperty, we'd
read from an uninitialized ApplicationLaunchProperty instance.

Instead, we can always initialize it so if this does happen, then the
outcome of doing such a thing is at least consistently reproducible.
2021-04-19 12:30:34 -04:00
Lioncash 6a68568356 npad: Remove duplicated class member variable
ControllerBase already has a System reference that can be accessed from
this class, so we can get rid of this to make the class layout a little
more straightforward.
2021-04-19 12:23:28 -04:00
Morph bebb8afcbf time: Write buffer before pushing RESULT_SUCCESS in GetClockSnapshot 2021-04-19 12:09:28 -04:00
Morph b8a414cea0 time: Fix GetClockSnapshotFromSystemClockContext
This removes an incorrect alignment usage and corrects the positions of the popped parameters.

- Fixes Super Kirby Clash crashing on boot
2021-04-19 11:17:47 -04:00
lat9nq 1e36a11626 general: Ignore implicit-fallthrough for SDL.h
SDL 2.0.14 introduces an incompatibility with Clang, causing it to
trigger -Wimplicit-fallthrough even though it is marked. Ignore it for
now, with a comment mentioning why this is needed.
2021-04-18 01:31:26 -04:00
lat9nq c8a26a2cbf cmake: Use SDL 2.0.14 and fix CMake scope issue
Forces using SDL 2.0.14. Upgrades the SDL external to that version. Adds
a message when switching to the external.

Fixes an error where input_common only links to SDL when SDL2_FOUND is
set, but externals/CMakeLists cannot set that variable to the required
scope. Switch to using ENABLE_SDL2, which we can use since we now
include the SDL source.
2021-04-17 23:42:57 -04:00
Morph c46a12cd4e applets: Send focus state change message on applet state change
Fixes the softlock after the controller applet exits in Mario Kart 8 Deluxe.
2021-04-17 09:26:48 -04:00
Morph defdb91b37 applets: Make the applet mode a protected property of Applet 2021-04-17 08:50:49 -04:00
bunnei 513b946494 Merge pull request #6125 from ogniK5377/nvdec-close-dev
nvdrv: Cleanup CDMA Processor on device closure
2021-04-16 23:14:44 -07:00
bunnei fddc868288 Merge pull request #6133 from Morph1984/project-eleuthia
Project Eleuthia - On-Screen Keyboard and Error Applet Overlays
2021-04-16 23:03:23 -07:00
bunnei f527e7a748 Merge pull request #6119 from german77/SDLMapping
InputCommon: Address mapping and naming issues with SDL2
2021-04-15 21:40:35 -07:00
Chloe Marcec e4b60c77d6 Address issues 2021-04-16 13:52:32 +10:00
Morph d00a4873bf applets/swkbd: Implement the Qt Software Keyboard frontend
The Qt Software Keyboard frontend attempts to mimic the software keyboard rendered by the Nintendo Switch.
This frontend implements multiple keyboard types, such as the normal software keyboard, the numeric pad software keyboard and the inline software keyboard.
Keyboard and controller input is also supported in this frontend.
Keyboard input is handled as native keyboard input, and so the on-screen keyboard cannot be navigated with the keyboard arrow keys as the arrow keys are used to move the text cursor.
Controller input is translated into mouse hover movements on the onscreen keyboard or their respective button actions (B for backspace, A for entering the selected button, L/R for moving the text cursor, etc).
The text check dialogs can also be confirmed with controller input through the use of the OverlayDialog

Massive thanks to Rei for creating all the UI for the various keyboards and OverlayDialog. This would not have been possible without his excellent work.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15 01:53:17 -04:00
Morph 714a8f2906 error: Make the error code as the title text of the OverlayDialog
Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15 01:53:17 -04:00
Morph c170ef2dc2 overlay_dialog: Add an overlay text dialog that accepts controller input
An OverlayDialog is an interactive dialog that accepts controller input (while a game is running)
This dialog attempts to replicate the look and feel of the Nintendo Switch's overlay dialogs and
provide some extra features such as embedding HTML/Rich Text content in a QTextBrowser.
The OverlayDialog provides 2 modes: one to embed regular text into a QLabel and another to embed
HTML/Rich Text content into a QTextBrowser.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2021-04-15 01:53:17 -04:00
Morph 6e85370a0e main: Move meta type registration into its own function
Moves the existing meta type registration into its own function and adds registration of common integral, floating point and string types.
This function is also now called in the constructor of the GMainWindow instead of on starting a game.
2021-04-15 01:53:17 -04:00
Morph 18770b0865 input_interpreter: Fix button hold being interpreted incorrectly on init
We reset all the button states to 0 except the first index (which has all the buttons as pressed) to prevent a button hold being interpreted as a button that was pressed once on the first poll.
2021-04-15 01:53:17 -04:00
Morph 01190506e8 applets/swkbd: Implement the Default Software Keyboard frontend 2021-04-15 01:53:17 -04:00
Morph c4885be3c2 applets/swkbd: Implement the Normal and Inline Software Keyboard Applet 2021-04-15 01:53:17 -04:00
Morph 957dfba645 ILibraryAppletCreator: Implement CreateHandleStorage
Used by Monster Hunter Generations Ultimate
2021-04-15 01:53:16 -04:00
Morph e1702e2844 hle_ipc: Add helper functions to get copy/move handles 2021-04-15 01:53:16 -04:00
Morph 169b40049c ILibraryAppletAccessor: Demote from ERROR to DEBUG for null storage logs
Avoids unnecessary console spam when the inline software keyboard is used.
2021-04-15 01:53:16 -04:00
Morph b04f94e80f applets: Pass in the LibraryAppletMode each applet's constructor 2021-04-15 01:53:16 -04:00
Morph ac87713cb8 applets: Remove the previous software keyboard applet implementation 2021-04-15 01:53:16 -04:00
Kewlan 886fdb2687 game_list: Mark games as favorite to make them appear at the top.
Icons are from Icons8.
2021-04-15 07:15:42 +02:00
bunnei 83ba604e60 Merge pull request #6199 from lioncash/log-ns
common/log: Move Log namespace into the Common namespace
2021-04-14 21:29:44 -07:00