Commit graph

7104 commits

Author SHA1 Message Date
Lioncash fdd9154069 kernel: Fix build with recent compiler flag changes
This slipped through the cracks due to another change being merged
before the compiler flag changes.
2020-10-20 20:23:18 -04:00
LC 88d5140cf2
Merge pull request #4796 from lioncash/clang
core: Fix clang build
2020-10-20 19:19:12 -04:00
bunnei 940c3bf68d
Merge pull request #4390 from ogniK5377/get-applet-inf-stub
nifm: GetAppletInfo stub
2020-10-20 15:59:19 -07:00
David Marcec 298b50e220 Added remaining params 2020-10-20 16:45:01 +11:00
David Marcec acd35e1b60 nifm: GetAppletInfo stub
Fixes crash for Catherine Full Body
2020-10-20 16:42:40 +11:00
bunnei 60bd54776a
Merge pull request #4788 from ReinUsesLisp/lockfree-host-thread
kernel: Implement host thread register methods without locking
2020-10-19 22:31:52 -07:00
bunnei e7a26ecec5
Merge pull request #4785 from Morph1984/fs-hades
filesystem: Fix CreateDirectory and DeleteFile
2020-10-19 16:04:01 -07:00
bunnei 598ef6b0b3
Merge pull request #4802 from lioncash/bcat
core: Add boxcat sources with target_sources
2020-10-19 12:40:49 -07:00
bunnei 54b977acaa
Merge pull request #4783 from bunnei/nvdrv-freespace
hle: service: nvdrv: Implement nvhost_as_gpu::FreeSpace.
2020-10-18 12:41:18 -07:00
Lioncash 0ab7bfdfce core: Add boxcat sources with target_sources
Same behavior, minus a script variable.
2020-10-18 08:09:06 -04:00
bunnei 2190f1a2b7
Merge pull request #4801 from lioncash/missing-bound
mii/manager: Make use of unused lower bound in GetRandomValue()
2020-10-17 23:32:40 -07:00
Lioncash be1954e04c core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
2020-10-17 19:50:39 -04:00
Lioncash c1577f3448 mii/manager: Make use of unused lower bound in GetRandomValue()
Previously, the lower bound wasn't being used and zero was being used as
the lower bound every time this function was called.

This affects the outcome of some of the randomized entries a little bit,
for example, the lower-bound for beard and mustache flags was supposed
to be 1, not 0.

Aside from these cases, the bug didn't affect anything else.
2020-10-17 09:50:04 -04:00
bunnei 363c644730 service: bcat: Check client connection before interacting with socket.
- Fixes a crash when BCAT service is offline.
2020-10-16 21:16:56 -07:00
bunnei dbd1662ae2
Merge pull request #4784 from bunnei/cancelbuffer
hle: service: vi: Implement BufferQueue::CancelBuffer.
2020-10-15 19:57:27 -07:00
bunnei 1d714c8c7f service: acc: Stub IManagerForApplication::StoreOpenContext.
- Used by Super Mario 3D All-Stars.
2020-10-14 20:06:33 -07:00
bunnei 1f186f34a2 hle: service: vi: Implement BufferQueue::CancelBuffer.
- This is used by Super Mario 3D All-Stars.
2020-10-13 22:11:52 -07:00
ReinUsesLisp b9a9b83bee kernel: Implement host thread register methods without locking
Locks on GetCurrentHostThreadID were causing performance issues
according to Visual Studio's profiler. It was consuming twice the time
as arm_interface.Run(). The cost was not in the function itself but in
the lockinig it required.

Reimplement these functions using atomics and static storage instead of
an unordered_map. This is a side effect to avoid locking and using linked
lists for reads.

Replace unordered_map with a linear search.
2020-10-13 18:00:25 -03:00
Lioncash 39c8d18feb core/CMakeLists: Make some warnings errors
Makes our error coverage a little more consistent across the board by
applying it to Linux side of things as well. This also makes it more
consistent with the warning settings in other libraries in the project.

This also updates httplib to 0.7.9, as there are several warning
cleanups made that allow us to enable several warnings as errors.
2020-10-13 13:16:49 -04:00
Morph 8db3feae19 filesystem: Fix CreateDirectory and DeleteFile
Add a check if dir is nullptr (does not exist)

Fixes save game creation in Hades
2020-10-13 00:57:04 -04:00
bunnei 62c6c9f6a6 service: time: Update current time with changes to RTC setting.
- This can be used to advance time, e.g. for Pokemon Sword/Shield pokejobs.
2020-10-12 18:09:15 -07:00
bunnei d291fc1a51
Merge pull request #3929 from FearlessTobi/ticket-keys
file_sys/nsp: Make SetTicketKeys actually do something
2020-10-12 17:58:36 -07:00
bunnei b260847218 hle: service: nvdrv: Implement nvhost_as_gpu::FreeSpace.
- This is used by Super Mario 3D All-Stars.
2020-10-12 17:39:14 -07:00
bunnei 92adb69fa7
Merge pull request #4736 from Morph1984/home-button-input-protection-stub
hid: Stub HomeButtonInputProtection service commands
2020-10-07 14:54:05 -07:00
bunnei cc0dc3280d
Merge pull request #4710 from Morph1984/fix-integrated-updates
submission_package: Fix updates integrated into cartridge images.
2020-10-06 22:27:52 -07:00
bunnei 32b4627a9c
Merge pull request #4737 from Morph1984/setshimlibraryversion-stub
capsrv: Stub 3 variants of SetShimLibraryVersion
2020-10-06 21:39:38 -07:00
bunnei 614bd0ee8c
Merge pull request #4742 from german77/InputFilter
HID: Only use inputs corresponding to controller type
2020-10-05 21:40:09 -07:00
bunnei 182cf7d631
Merge pull request #4734 from german77/motionfusion
HID: Add Stub for EnableSixAxisSensorFusion
2020-10-01 22:39:39 -07:00
german 2f47b27654 Only use inputs corresponding to controller type 2020-10-01 19:39:53 -05:00
german 283616dbd8 Stubbed EnableSixAxisSensorFusion 2020-09-30 10:00:24 -05:00
David 4d0ae1a17a
Merge pull request #4291 from german77/ImplementControllerRumble
input_common: First implementation of controller rumble
2020-09-30 21:24:11 +10:00
David f7808f5658
Merge pull request #4726 from lioncash/applet
frontend/controller: Eliminate dependency on the global system instance
2020-09-30 21:22:45 +10:00
Morph 91bd2281bf caps_c: Stub SetShimLibraryVersion
- Used by caps_su SetShimLibraryVersion
2020-09-30 07:19:46 -04:00
Morph 7d287a6fb0 caps_u: Stub SetShimLibraryVersion
- Used in Super Smash Bros. Ultimate
2020-09-30 07:19:46 -04:00
Morph 9a251339dc caps_su: Properly stub SetShimLibraryVersion 2020-09-30 07:19:46 -04:00
Morph 6380731486 hid: Stub HomeButtonInputProtection service commands
- Used in 1-2 Switch. Given that we do not emulate the functionality of the home button yet, we can stub this for now.
2020-09-30 06:38:24 -04:00
bunnei 392c1b96bc
Merge pull request #4705 from german77/SplitMotionPoller
HID: Use different timing for motion
2020-09-30 01:04:22 -07:00
bunnei 02ea62568f
Merge pull request #1703 from DarkLordZach/nvdec-ioctl
nvdrv: Stub nvdec/vic ioctls to bypass nvdec movies
2020-09-29 15:00:48 -07:00
german ab88c2f611 First implementation of controller rumble 2020-09-29 10:38:25 -04:00
Lioncash 5c4e237902 core: Mark GetInstance() as deprecated
This way it's obvious that this function shouldn't be used in any future
code.
2020-09-25 19:23:23 -04:00
Lioncash 3e4a0a13cb frontend/controller: Eliminate dependency on the global system instance 2020-09-25 19:23:20 -04:00
LC 4d4afc1502
Merge pull request #4717 from lioncash/debug
service: Restore "unused" function
2020-09-25 00:07:19 -04:00
Lioncash f3a1bf53f9 service: Restore "unused" function
Turns out this function is actually used, but within a trace log.
2020-09-25 00:06:40 -04:00
Morph 3602df7f1f submission_package: Fix updates integrated into cartridge images. 2020-09-24 17:23:14 -04:00
bunnei fa4294cc6f
Merge pull request #4678 from Morph1984/LoadOpenContext-partial-impl
acc: Partially implement LoadOpenContext
2020-09-24 11:21:25 -07:00
german ddff03cff5 Use different timing for motion 2020-09-23 19:09:33 -05:00
Lioncash b14d344dfc memory: Resolve a -Wdocumentation warning
memory doesn't exist as a parameter any more.
2020-09-23 13:39:27 -04:00
Lioncash ff45c39578 General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal
buffer of the optional, and instead only set the validity byte within
the structure.

This also makes it consistent how we return empty optionals.
2020-09-22 17:32:33 -04:00
Lioncash a881efbf26 ips_layer: Eliminate a redundant copy in Parse()
Prevents unnecessary copying of the line being parsed.
2020-09-22 16:38:45 -04:00
bunnei 53829d4cbd
Merge pull request #4675 from Morph1984/fix-boot-multicontent
submission_package: Account for multi-content NSPs
2020-09-21 16:36:46 -07:00
Morph 7a504a9365 acc: Stub LoadOpenContext
This is used in multiple games such as:
- Clubhouse Games: 51 Worldwide Classics
- Grandia HD Collection
- XCOM 2 Collection
- Baldur's Gate 1/2
- Dr Kawashima's Brain Training
- Super Mario 3D All-Stars
2020-09-21 01:01:02 -04:00
bunnei 754109fd54
Merge pull request #4683 from Morph1984/NpadHandheldActivationMode-impl
hid: Implement Get/SetNpadHandheldActivationMode
2020-09-20 12:39:20 -07:00
bunnei 8a85a562ed
Merge pull request #4643 from FearlessTobi/decrease-pad-update-interval
Test: Decrease pad_update_ns
2020-09-19 00:39:50 -07:00
Morph ab961e0701 hid: Implement Get/SetNpadHandheldActivationMode
- Used in Clubhouse Games: 51 Worldwide Classics
2020-09-18 10:10:30 -04:00
Morph 40a72e9cd5 am: Stub GetPreviousProgramIndex
- Used in Super Mario 3D All-Stars
2020-09-17 22:03:02 -04:00
Morph 41c2f5200c submission_package: Account for multi-content NSPs
Previously we assumed a submission package can only contain one Program NCA with a single TitleID.
However, Super Mario 3D All-Stars contains four Program NCAs, each with their unique TitleIDs.
This accounts for the existence of multi-content games such as this one.
- Fixes booting Super Mario 3D All-Stars from the games list.
2020-09-17 20:44:51 -04:00
Rodrigo Locatti 53fc5d0190
Merge pull request #4670 from lioncash/initializer
arm_dynarmic_cp15: Initialize member variables
2020-09-17 21:20:53 +00:00
Rodrigo Locatti 9bdca01c27
Merge pull request #4665 from lioncash/sm-kernel
service/sm: Eliminate dependency on the global system instance
2020-09-17 21:20:39 +00:00
Rodrigo Locatti 8100275309
Merge pull request #4666 from lioncash/unused-func
service: Remove unused funcation
2020-09-17 21:19:48 +00:00
Rodrigo Locatti 131532b570
Merge pull request #4671 from lioncash/nfp-copy
command_generator/nfp: Eliminate unnecessary copies
2020-09-17 21:19:12 +00:00
bunnei 3f6d83b27c
Merge pull request #4594 from german77/MotionHID
hid/configuration: Implement motion controls to HID
2020-09-17 12:39:01 -07:00
Lioncash aca3621146 nfp: Eliminate two unnecessary copies
GetAmiiboBuffer() returns by const reference, so we can use a reference
instead of taking the returned buffer by value.
2020-09-17 13:35:55 -04:00
Lioncash 1ee9ceb5af arm_dynarmic_cp15: Initialize member variables
Ensures that the member variables are always initialized to a
deterministic value on creation.
2020-09-17 13:03:49 -04:00
Lioncash 02b8b6677a control_metadata: Resolve typo in Portuguese language name
This isn't used anywhere, so this is a trivial fix.
2020-09-17 11:45:30 -04:00
Lioncash 8bbd82863d service: Remove unused funcation
This is now completely unused, so it can be removed.
2020-09-17 11:03:26 -04:00
Lioncash 057aa6275d service/sm: Slightly more efficient string name validation
We can check the end of the string first for null-termination, rather
than the beginning of the string.
2020-09-17 10:54:12 -04:00
Lioncash 78b1bc3b61 service/sm: Eliminate dependency on the global system instance 2020-09-17 10:43:54 -04:00
Lioncash a62c1999c5 file_sys/romfs_factory: Eliminate usage of the global system accessor 2020-09-16 19:15:19 -04:00
Lioncash 0e80567bef file_sys/bis_factory: Eliminate usage of the global system accessor 2020-09-16 18:16:04 -04:00
Lioncash aa8d6fc041 loader/nso: Remove unnecessary [[maybe_unused]] 2020-09-16 18:09:01 -04:00
Lioncash 113a3972a6 core/loader: Remove dependencies on the global system instance
Now all that remains is:

18 instances in file_sys code
14 instances in GDB stub code (this can be tossed wholesale)
4 instances in HLE code
2 instances in settings code.
2020-09-16 08:46:59 -04:00
Rodrigo Locatti 004bfefeb5
Merge pull request #4658 from lioncash/copy3
nca_patch: Reduce stack usage size within SearchBucketEntry()
2020-09-16 00:25:11 +00:00
Lioncash 66fc037ef2 nca_patch: Significantly reduce the stack usage size within SearchBucketEntry()
Previously this function was using ~16KB of stack (16528 bytes), which
was caused by the function arguments being taken by value rather than by
reference.

We can make this significantly lighter on the stack by taking them by
reference.
2020-09-15 09:10:58 -04:00
Lioncash 99b372a6c5 nca_patch: Make SearchBucketEntry() internally linked
This is only used internally and doesn't depend on any class state, so
we can make it fully internal.
2020-09-15 09:06:46 -04:00
Lioncash 3a8464cde2 cheat_engine: Convert ExtractName into a non-template function
We don't need to create two separate instantiations of the same code, we
can simply make the character template argument a regular function
parameter.
2020-09-15 03:24:44 -04:00
Lioncash ba7eb5abf4 cheat_engine: Remove unnecessary system argument to CheatParser's Parse function
This isn't used within the function at all in any implementations, so we
can remove it entirely.
2020-09-15 03:20:40 -04:00
Lioncash 33e4a0b6c1 patch_manager: Resolve implicit truncations in FormatTitleVersion()
We make it explicit that we're truncating arithmetic here to resolve
compiler warnings (even if the sizes weren't u32/u64 arithmetic
generally promotes to int :<)
2020-09-14 19:19:59 -04:00
Lioncash a4392c24cf patch_manager: Make use of type aliases
We can use these to avoid typing the same type redundantly. This way, if
these ever change, only a single location needs to be modified.
2020-09-14 19:17:50 -04:00
Lioncash 637ab14ae6 patch_manager: Make a few functions internally linked
These functions are only used within this translation unit, so we can
make them internally linked.
2020-09-14 19:04:51 -04:00
Lioncash e0dd440b1f crypto/key_manager: Remove dependency on the global system accessor
We can supply the content provider as an argument instead of hardcoding
a global accessor in the implementation.
2020-09-14 16:49:59 -04:00
Lioncash ec2a6e5ba8 kernel: Remove all dependencies on the global system instance
With this, the kernel finally doesn't depend directly on the global
system instance anymore.
2020-09-14 14:03:13 -04:00
bunnei 042567e4b2
Merge pull request #4636 from lioncash/kernel-hle
service: Remove two usages of the global system accessor
2020-09-14 09:17:10 -07:00
bunnei 5fc6bf96d8
Merge pull request #4323 from ReinUsesLisp/no-spin
kernel/scheduler: Use std::mutex instead of spin lock
2020-09-11 23:23:53 -07:00
bunnei ec634b6a88
Merge pull request #4634 from lioncash/blocking
bsd: Resolve a few warnings
2020-09-11 15:17:34 -07:00
bunnei 324029d4f9
Merge pull request #4310 from ogniK5377/apollo-1-prod
audio_core: Apollo Part 1, AudioRenderer refactor
2020-09-11 10:57:27 -04:00
bunnei 03179ecafe
Merge pull request #4597 from Morph1984/mjolnir-p2
Project Mjölnir: Part 2 - Controller Applet
2020-09-10 19:28:23 -04:00
FearlessTobi 57162e1df3 Test: Decrease pad_update_ns
There have been reports of quite heavy input lag in the past.
Compared to Citra for example, our pad_update_ns value is very high.
So let's decrease it and see if it helps with this problem.
2020-09-10 16:38:53 +02:00
Rodrigo Locatti 663ea382da
Merge pull request #4633 from ReinUsesLisp/gpu-init
video_core: Remove all Core::System references in renderer
2020-09-10 02:28:54 +00:00
Lioncash ffdf8c0cb3 service: Remove two usages of the global system accessor
Removes more instances of reliance on global state.
2020-09-07 03:18:45 -04:00
Lioncash 40968e3993 bsd: Resolve unused value within SendToImpl
Previously the address provided to SendToImpl would never be propagated
to SendTo(). This fixes that.
2020-09-07 01:06:30 -04:00
Lioncash cd643ab5c9 bsd: Resolve sign comparison warnings 2020-09-07 01:06:27 -04:00
Lioncash 180fa6859f sockets_translate: Make use of designated initializers
Same behavior, less typing.
2020-09-07 00:53:10 -04:00
Lioncash 188a3cf74c blocking_worker: Make use of templated lambda
We can simplify this a little by explicitly specifying the typename for
the lambda function.
2020-09-07 00:47:46 -04:00
Lioncash 9652973db2 blocking_worker: Resolve -Wdocumentation warning 2020-09-07 00:45:53 -04:00
ReinUsesLisp 9e87193725 video_core: Remove all Core::System references in renderer
Now that the GPU is initialized when video backends are initialized,
it's no longer needed to query components once the game is running: it
can be done when yuzu is booting.

This allows us to pass components between constructors and in the
process remove all Core::System references in the video backend.
2020-09-06 05:28:48 -03:00
bunnei e126021ffe
Merge pull request #4397 from ReinUsesLisp/bsd
services: Implement most of bsd:s and GetCurrentIpAddress from nifm
2020-09-05 22:40:59 -04:00
Morph 5b6268d26a configure_input: Hook up the motion button and checkbox
This allows toggling motion on or off, and allows access to the motion configuration.
Also changes the [waiting] text for motion buttons to Shake! as this is how motion is connected to a player.
2020-09-05 09:46:34 -04:00
german 6ee8eab670 Add cemu hook changes related to PR #4609 2020-09-04 21:48:13 -05:00
german 0774b17846 Remove RealMotionDevice 2020-09-04 21:48:13 -05:00
Morph df3cbd4758 controllers/npad: Simplify motion entry assignment
Simplifies the motion assignment in the Dual Joycon entry and assigns index 1 of the motion entry (Motion 2) for the right joycon.
2020-09-04 21:48:13 -05:00
german ff679f3d17 Include HID and configuration changes related to motion 2020-09-04 21:48:03 -05:00
Morph 0e33b19ae0 hid: Implement MergeSingleJoyasDualJoy
- Used in multiple games such as Super Mario Odyssey.
2020-09-04 15:38:33 -04:00
Morph b65456b958 applets/controller: Resolve several compiler warnings
Resolves -Wsign-compare and -Wunused-variable
2020-09-04 12:23:26 -04:00
Morph 076e4d44c3 Address feedback 2020-09-04 12:23:25 -04:00
Morph f95ea04995 applets/controller: Set min_players to have a minimum value of 1.
- Some games like Shipped have a minimum requirement of 0 connected players and is undesired behavior. We must require a minimum of 1 player connected regardless of what games may ask.
2020-09-04 12:23:25 -04:00
Morph 371226448a applets/controller: Modify heuristic to account for certain games
Now left and right joycons have the same priority (meaning both needs to be supported by the game).

Explanation of the new heuristic:
Assign left joycons to even player indices and right joycons to odd player indices.
We do this since Captain Toad Treasure Tracker expects a left joycon for Player 1 and a right Joycon for Player 2 in 2 Player Assist mode.
2020-09-04 12:23:25 -04:00
Morph 7299356f37 applets/controller: Implement fallback applet for the SDL frontend
Implement the fallback applet for the SDL frontend, connecting only the minimum amount of players required.
2020-09-04 12:23:25 -04:00
Morph 5ce3015945 applets/controller: Implement "Explain Text"
"Explain Text" is additional text that is shown for each player in the controller applet.
2020-09-04 12:23:25 -04:00
Morph 5219615418 Project Mjölnir: Part 2 - Controller Applet
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-09-04 12:23:25 -04:00
bunnei ba5419b965
Merge pull request #4590 from ReinUsesLisp/tsan-sched
hle/scheduler: Fix data race in is_context_switch_pending
2020-09-03 14:39:57 -04:00
ReinUsesLisp 827ff077e7 file_sys/patch_manager: Add missing include
Fixes build issues
2020-09-03 04:51:49 -03:00
bunnei 38980b2471
Merge pull request #4568 from lioncash/fsp
fsp_srv: Resolve -Wmaybe_uninitialized warning in OpenSaveDataFileSystem()
2020-09-02 23:07:03 -04:00
bunnei 57e43682ed
Merge pull request #4564 from lioncash/file-include
file_sys: Replace inclusions with forward declarations where applicable
2020-09-02 23:06:38 -04:00
bunnei 3dcccabd1d
Merge pull request #4382 from FearlessTobi/port-udp-config
yuzu: Add motion and touch configuration from Citra
2020-09-01 13:56:37 -04:00
bunnei a1f13a3662
Merge pull request #4589 from ReinUsesLisp/tsan-host
hle/kernel: Fix data race in GetCurrentHostThreadID
2020-08-31 21:20:49 -04:00
LC b5ed2d408c
Merge pull request #4461 from comex/thread-names
Fix thread naming on Linux, which limits names to 15 bytes.
2020-08-31 15:31:48 -04:00
FearlessTobi d1e1ea0fef Address second batch of reviews 2020-08-30 00:43:25 +02:00
FearlessTobi e6bd1fd1b8 yuzu: Add motion and touch configuration 2020-08-29 18:56:34 +02:00
bunnei 40320a1d84
Merge pull request #4586 from yuzu-emu/tsan-cpu-interrupt
cpu_interrupt_handler: Make is_interrupted an atomic
2020-08-28 09:21:47 -04:00
Morph eb149ec696 controllers/npad: Fix inconsistencies with controller connection statuses 2020-08-26 02:32:32 -04:00
Morph 334ef2efdd controllers/npad: Fix LibNX controller connection statuses
This allows homebrew applications to be able to properly detect connected controllers.
2020-08-26 02:32:32 -04:00
Morph e7c174b426 controllers/npad: Fix LedPattern for P1-4 2020-08-26 02:32:32 -04:00
Morph f0fac0c7fb Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26 02:32:32 -04:00
ReinUsesLisp ccdd84a778 hle/scheduler: Fix data race in is_context_switch_pending
As reported by tsan, SelectThreads could write to
is_context_switch_pending holding a mutex while SwitchToCurrent reads it
without holding any.

It is assumed that the author didn't want an atomic here, so the code is
reordered so that whenever is_context_switch_pending is read inside
SwitchToContext, the mutex is locked.
2020-08-26 02:56:05 +00:00
ReinUsesLisp 36eade7f4c hle/kernel: Fix data race in GetCurrentHostThreadID
As reported by tsan, host_thread_ids could be read while
any of the RegisterHostThread variants were called.

To fix this, lock the register mutex when yuzu is running in multicore
mode and GetCurrentHostThreadID is called.
2020-08-26 02:52:50 +00:00
ReinUsesLisp 56ac22f737 cpu_interrupt_handler: Misc style changes 2020-08-26 02:43:26 +00:00
ReinUsesLisp ea7bda25ba cpu_interrupt_handler: Make is_interrupted an atomic
Fixes a race condition detected from tsan
2020-08-26 02:43:15 +00:00
bunnei dd828607e0
Merge pull request #4563 from lioncash/rcache
registered_cache: Make use of designated initializers
2020-08-25 10:07:33 -04:00
M&M 43ce33b6cc logging/settings: Increase maximum log size to 100 MB and add extended logging option
The extended logging option is automatically disabled on boot but can be enabled afterwards, allowing the log file to go up to 1 GB during that session.
This commit also fixes a few errors that are present in the general debug menu.
2020-08-24 21:39:56 -07:00
bunnei 6fd3a1bf85
Merge pull request #4562 from lioncash/loop
cpu_manager: Make use of ranged for where applicable
2020-08-24 17:58:41 -04:00
bunnei ab350b8975
Merge pull request #4561 from lioncash/key-constexpr
key_manager: Make data arrays constexpr
2020-08-23 20:41:05 -04:00
bunnei 42a00877a2
Merge pull request #4549 from lioncash/files
vfs_real: Avoid redundant map lookups
2020-08-23 19:08:36 -04:00
Lioncash 4c1a95ed61 fsp_srv: Resolve -Wunused-but-set-variable warning
We can just log out the parameters in the meantime.
2020-08-23 17:16:32 -04:00
Lioncash 01d1b5cdaf file_sys: Replace inclusions with forward declarations where applicable
Same behavior, minus unnecessary inclusions where not necessary.
2020-08-23 17:02:55 -04:00
Lioncash 85db5f4091 fsp_srv: Resolve -Wmaybe_uninitialized warning in OpenSaveDataFileSystem()
Initialize id to a deterministic value and also mark the unreachable
cases in the switch with UNREACHABLE().
2020-08-23 16:37:57 -04:00
Lioncash 67a8e73101 registered_cache: Make use of ends_with for string suffix checking
Simplifies code.
2020-08-23 11:25:45 -04:00
Lioncash f83c6e1e0c registered_cache: Make use of designated initializers
Removes the need for comments to indicate the fields being assigned.
2020-08-23 10:26:20 -04:00
bunnei cfb7fd395c
Merge pull request #4560 from lioncash/convert
core_timing: Resolve sign conversion warning
2020-08-23 02:11:14 -04:00
Lioncash b62a8ca43e key_manager: Make data arrays constexpr
We can convert these maps into constexpr arrays to eliminate some
runtime static constructors.
2020-08-22 22:47:24 -04:00
Lioncash 544fbd5c84 cpu_manager: Make use of ranged for where applicable
We can simplify a few loops by making use of ranged for.
2020-08-22 22:43:19 -04:00
Lioncash 79504f1a39 core_timing: Remove unused header 2020-08-22 22:12:37 -04:00
Lioncash 25cd5d9dda core_timing: Move clock initializer into constructor initializer list
Same behavior, minus unnecessary zeroing out of the pointer.
2020-08-22 20:26:48 -04:00
Lioncash 2624b1eae6 core_timing: Resolve sign conversion warning
This constant is only ever assigned to downcount, which is a s64, not a
u64.
2020-08-22 20:26:45 -04:00
bunnei 66ac7cf730
Merge pull request #4541 from MerryMage/yolo
dynarmic: Add unsafe optimizations
2020-08-21 23:06:21 -04:00
Lioncash f6bb905182 common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
2020-08-18 15:08:32 -04:00
Lioncash 551882e512 vfs_real: Resolve sign conversion warnings 2020-08-18 14:58:33 -04:00
Lioncash ed9ae5a977 vfs_real: Avoid redundant map lookups
Avoids some trivially avoidable map lookups by keeping the result of
find operations around and querying them.
2020-08-18 14:58:29 -04:00
bunnei 56c6a5def8
Merge pull request #4535 from lioncash/fileutil
common/fileutil: Convert namespace to Common::FS
2020-08-17 22:35:30 -04:00
bunnei 0530dd6ea1
Merge pull request #4494 from lioncash/transcode
aes_util: Make use of non-template variant of Transcode
2020-08-17 03:50:35 -04:00
MerryMage 836ec9176a dynarmic: Add unsafe optimizations 2020-08-16 14:15:39 +01:00
Lioncash c4ed791164 common/fileutil: Convert namespace to Common::FS
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.

This also allows for high-traffic FS related code to alias the
filesystem function namespace as

namespace FS = Common::FS;

for more concise typing.
2020-08-16 06:52:40 -04:00
bunnei 2b601e8636
Merge pull request #4526 from lioncash/core-semi
core: Resolve several -Wextra-semi warnings
2020-08-15 02:14:11 -04:00
bunnei e6f9231ef0
Merge pull request #4527 from lioncash/pessimizing2
software_keyboard: Resolve a pessimizing move warning
2020-08-15 02:13:44 -04:00
bunnei cb6808b4d0
Merge pull request #4492 from lioncash/linkage
system_control: Make functions internally linked where applicable
2020-08-15 02:11:49 -04:00
bunnei 2aabd1eb05
Merge pull request #4463 from lioncash/lockdiscard
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
2020-08-15 01:31:23 -04:00
Lioncash b14277ef97 time_zone_content_manager: Collapse auto and default case
Prevents a useless self-assignment from occurring.
2020-08-14 10:58:58 -04:00
Lioncash 03d5a5d9de software_keyboard: Resolve a pessimizing move warning
A std::vector created in place like this is already an rvalue and
doesn't need to be moved.
2020-08-14 09:14:54 -04:00
Lioncash 2296e921d2 core: Resolve several -Wextra-semi warnings
We can amend one of the cascade macros to require semicolons in order to
compile. In other cases, we can just remove the superfluous semicolons.
2020-08-14 09:09:20 -04:00
Lioncash a93f6e51d3 emu_window: Mark Scoped constructor and Acquire() as nodiscard
Ensures that callers make use of the constructor, preventing bugs from
silently occurring.
2020-08-14 04:43:44 -04:00
Lioncash f808258ed9 kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
2020-08-14 04:43:44 -04:00
Rodrigo Locatti e050594706
Merge pull request #4495 from lioncash/conv
cheat_engine: Resolve implicit bool->u64 conversion
2020-08-14 03:10:17 -03:00
LC ff0b14ee62
Merge pull request #4511 from lioncash/build2
General: Tidy up clang-format warnings part 2
2020-08-13 15:13:21 -04:00
Lioncash b724a4d90c General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
bunnei a8ffe6eee4
Merge pull request #4497 from lioncash/freezer-alg
freezer: Make use of std::erase_if
2020-08-11 23:07:17 -04:00
bunnei 257b1d2c4b
Merge pull request #4496 from lioncash/ce-desig
cheat_engine: Make use of designated initializers
2020-08-10 13:53:43 -04:00
bunnei acfd771e79
Merge pull request #4491 from lioncash/unused-vars
kernel: Remove unused variables
2020-08-10 12:04:30 -04:00
bunnei 664019954a
Merge pull request #4488 from lioncash/file
vfs_vector: Make creation of array vfs files less verbose
2020-08-09 17:19:34 -04:00
bunnei 929fc849e9
Merge pull request #4457 from ogniK5377/SetScreenShotPermission
am: Unstub SetScreenShotPermission
2020-08-07 09:34:20 -04:00
Lioncash 8e86fa7e60 common/concepts: Rename IsBaseOf to DerivedFrom
This makes it more inline with its currently unavailable standardized
analogue std::derived_from.

While we're at it, we can also make the template match the requirements
of the standardized variant as well.
2020-08-07 08:09:57 -04:00
bunnei f5d538f118
Merge pull request #4483 from lioncash/constexpr-hex
partition_data_manager: Make data arrays constexpr
2020-08-06 23:14:14 -04:00
bunnei 5cc2f99fab
Merge pull request #4490 from lioncash/arbiter
address_arbiter/scheduler: Resolve sign conversion warnings
2020-08-06 22:28:11 -04:00
Lioncash 61cd7eb47d freezer: Move entry finding to its own function
Cleans up the callsites in other functions.
2020-08-06 03:11:21 -04:00
Lioncash 06ab28263b freezer: Take address values by value
VAddr will always be 64-bit, so there's no need to take a trivial
primitive alias by reference.
2020-08-06 03:04:54 -04:00
Lioncash 253a17451b freezer: Make use of std::erase_if
With C++20 we can simplify the erasing idiom.
2020-08-06 03:03:05 -04:00
Lioncash 5b89291308 cheat_engine: Resolve implicit bool->u64 conversion
We can just return zero here.
2020-08-06 02:55:47 -04:00
Lioncash df96a214ae cheat_engine: Make use of designated initializers
Same behavior, but makes the member being assigned obvious.
2020-08-06 02:48:13 -04:00
Lioncash 4f2acc54f5 partition_data_manager: Update master key hashes
Fills in some hashes that were previously unhandled.
2020-08-06 02:42:01 -04:00
Lioncash 7f0f37fca7 partition_data_manager: Make data arrays constexpr
Previously the constructor for all of these would run at program
startup, consuming time before the application can enter main().

This is also particularly dangerous, given the logging system wouldn't
have been initialized properly yet, yet the program would use the logs
to signify an error.

To rectify this, we can replace the literals with constexpr functions
that perform the conversion at compile-time, completely eliminating the
runtime cost of initializing these arrays.
2020-08-06 02:41:58 -04:00
Lioncash 04bb47f57f partition_data_manager: Eliminate magic value
We can use sizeof to make it obvious at the call site where the value is
coming from.
2020-08-06 02:34:10 -04:00
Lioncash 09f884b7bd aes_util: Make use of non-template variant of Transcode
Same behavior, less template instantiations.
2020-08-06 02:31:19 -04:00
comex d37f0b29e2 Fix thread naming on Linux, which limits names to 15 bytes.
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at
  least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and
  do nothing.
- Also, add logging in case `pthread_set_name_np` returns an error
  anyway.  This is Linux-specific, as the Apple and BSD versions of
  `pthread_set_name_np return `void`.
- Change the name for CPU threads in multi-core mode from
  "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it
  fits into the Linux limit.  Some other thread names are also cut off,
  but I didn't bother addressing them as you can guess them from the
  truncated versions.  For a CPU thread, truncation means you can't see
  which core it is!
2020-08-05 20:34:49 -07:00
bunnei 1cc0e4b4d8
Merge pull request #4489 from lioncash/typesafe
ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
2020-08-05 23:20:23 -04:00
bunnei 35c1607f23
Merge pull request #4484 from lioncash/aesutil
aes_util: Allow SetIV() to be non-allocating
2020-08-05 22:35:41 -04:00
bunnei 61678c4e9f
Merge pull request #4475 from lioncash/bqueue
buffer_queue: Make use of designated initializers/std::nullopt where applicable
2020-08-05 16:56:46 -04:00
Lioncash 87c64c41d2 system_control: Make functions internally linked where applicable
These functions are only ever used internally as implementation details
for GenerateRandomRange(), so these can be given internal linkage.
2020-08-05 15:34:27 -04:00
Lioncash a10d64ea79 kernel: Remove unused variables
Resolves a few compiler warnings.
2020-08-05 15:19:48 -04:00
Lioncash 9893da8e2c scheduler: Resolve sign conversion warning 2020-08-05 15:12:29 -04:00
Lioncash 1a45b15a8c address_arbiter: Resolve sign conversion warning
Makes our type conversion explicit.
2020-08-05 15:07:19 -04:00
bunnei 4a2d9c6454
Merge pull request #4444 from lioncash/volatile
common/atomic_ops: Don't cast away volatile from pointers
2020-08-05 14:22:36 -04:00
Lioncash a77ee63f65 ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
It's undefined behavior to use non-trivially copyable objects with
std::memcpy, so we can add asserts to catch usages of these at
compile-time.
2020-08-05 14:08:28 -04:00
Lioncash 0a5456feb9 vfs_vector: Make creation of array vfs files less verbose
We can add a helper function to make creation of these files nicer.
While we're at it, we can eliminate an unnecessary std::array copy in
the constructor. This makes the overhead on some of these functions way
less intensive, given some arrays were quite large.

e.g. The timezone location names are 9633 bytes in size.
2020-08-05 12:37:00 -04:00
bunnei 07691f994a
Merge pull request #4466 from ogniK5377/loader-type-safe
loader: Make IdentifyFile typesafe
2020-08-05 12:34:25 -04:00
bunnei 142930e609
Merge pull request #4476 from lioncash/tz
time_zone_binary: Make use of designated initializers
2020-08-04 18:56:28 -04:00
bunnei ba9ed7b1fe
Merge pull request #4401 from ogniK5377/GetIndirectLayerImageRequiredMemoryInfo
vi: IApplicationDisplayService:GetIndirectLayerImageRequiredMemoryInfo
2020-08-04 18:45:11 -04:00
bunnei f11628b9b7
Merge pull request #4430 from bunnei/new-gpu-vmm
hle: nvdrv: Rewrite of GPU memory management.
2020-08-04 18:44:26 -04:00
bunnei ecbee11829
Merge pull request #4472 from lioncash/const-get
perf_stats: Mark GetMeanFrametime() as const
2020-08-04 07:00:23 -07:00
David 741cbbdc0e
Merge pull request #4470 from lioncash/qualifier
patch_manager: Resolve -Wignored-qualifier warnings
2020-08-04 14:09:48 +10:00
David 723314b682
Merge pull request #4481 from lioncash/cpp-dep
yuzu: Resolve C++20 deprecation warnings related to lambda captures
2020-08-04 14:06:07 +10:00
David 25fb7cd16d
Merge pull request #4474 from lioncash/hle-profile
profile_manager: Make use of designated initializers
2020-08-04 13:51:15 +10:00
bunnei c6e5a36452
Merge pull request #4473 from lioncash/cheat-desig
dmnt_cheat_vm: Make use of designated initializers
2020-08-03 18:07:17 -07:00