Commit Graph

14143 Commits

Author SHA1 Message Date
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
bunnei fcd0925ecf
Merge pull request #4653 from ReinUsesLisp/gc-warns
gc_adapter: Disable MSVC nonstandard extension warning on libusb.h
2020-09-16 22:33:58 -07:00
bunnei 1eae35621e
Merge pull request #4663 from ReinUsesLisp/wswitch
video_core: Enforce -Werror=switch
2020-09-16 20:43:23 -07: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
ReinUsesLisp eb914b6c50 video_core: Enforce -Werror=switch
This forces us to fix all -Wswitch warnings in video_core.
2020-09-16 17:48:01 -03: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
ReinUsesLisp bc8ace9917 gc_adapter: Disable MSVC nonstandard extension warning on libusb.h
Pragma disable zero-sized array nonstandard extension warning on MSVC.
2020-09-14 19:38:08 -03: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
bunnei 41b8ecdeb6
Merge pull request #4608 from lioncash/sign3
configure_input_player: Resolve sign conversion warnings in UpdateMappingWithDefaults()
2020-09-10 13:56:16 -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 c715fc4c5e gc_adapter: Make DeviceConnected() a const member function
This doesn't modify instance state, so it can be made const.
2020-09-07 02:49:13 -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
bunnei 841b295ad0
Merge pull request #4606 from lioncash/constexpr
game_list_p: Mark some constants as constexpr
2020-09-06 23:19:38 -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 797564599f Minor cleanup 2020-09-05 09:42:21 -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 8e18b61972 configure_input_player: Show/hide motion buttons based on the controller 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 1ec71b6ea0 clang-format 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 6597b3817c main: Apply settings after applet configuration is complete. 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 72b2f5d34f applets/controller: Load configuration prior to setting up connections
This avoids unintentionally changing the states of elements while loading them in.
2020-09-04 12:23:25 -04:00
Morph aeec0f8a38 applets/controller: Make 8 a static constexpr value of NUM_PLAYERS
Avoids repetitive usages of the int literal '8' or calls to player_widgets.size()
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 94a25b75a0
Merge pull request #4611 from lioncash/xbyak2
externals: Update Xbyak to 5.96
2020-09-03 20:24:27 -04:00
bunnei 3b0fe38e86
Merge pull request #4583 from lioncash/trunc
gc_poller: Resolve compilation warnings on MSVC
2020-09-03 20:23:33 -04:00
bunnei 40c230e0fa
Merge pull request #4578 from lioncash/xor
common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORS
2020-09-03 17:11:51 -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
bunnei 39319f09d8
Merge pull request #4575 from lioncash/async
async_shaders: Mark getters as const member functions
2020-09-03 11:34:30 -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
lat9nq 0914e84014 main: Use three dots to complete the ellipsis
Fixes a typo in the UI file. An ellipsis has 3 dots.
2020-09-02 15:23:15 -04:00
Morph 45ecd601be input_common/motion_input: Make use of Common::PI constant
Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
2020-09-02 11:58:15 -04:00
bunnei f64917a852
Merge pull request #4570 from german77/motionInput
input_common: Add a basic class for motion devices
2020-09-02 11:09:18 -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 ad9ce67b52
Merge pull request #4588 from ReinUsesLisp/tsan-event
common/thread: Fix data race in is_set
2020-08-31 21:21:38 -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
ReinUsesLisp c573920c01 vk_device: Fix driver id check on AMD for VK_EXT_extended_dynamic_state
'driver_id' can only be known on Vulkan 1.1 after creating a logical
device. Move the driver id check to disable
VK_EXT_extended_dynamic_state after the logical device is successfully
initialized.

The Vulkan device will have the extension enabled but it will not be
used.
2020-08-30 20:22:48 -03:00
Lioncash a5dcccfdd2 externals: Update Xbyak to 5.96
I made a request on the Xbyak issue tracker to allow some constructors
to be constexpr in order to avoid static constructors from needing to
execute for some of our register constants.

This request was implemented, so this updates Xbyak so that we can make
use of it.
2020-08-30 05:09:48 -04:00
bunnei e9b9fc4674
Merge pull request #4601 from lioncash/const3
sdl_impl: Minor cleanup
2020-08-29 23:23:41 -04:00
bunnei 37faf24c3f
Merge pull request #4605 from lioncash/copy3
bootmanager: Prevent unnecessary copies in TouchUpdateEvent()
2020-08-29 23:22:39 -04:00
FearlessTobi d1e1ea0fef Address second batch of reviews 2020-08-30 00:43:25 +02:00
Lioncash 92c162126b configure_input_player: Resolve sign conversion warnings in UpdateMappingWithDefaults()
Prevents sign mismatch warnings in the loop conditionals.
2020-08-29 16:43:12 -04:00
FearlessTobi 0aa6ec4276 Reolve reorder warning 2020-08-29 22:06:47 +02:00
FearlessTobi d176feffad Address review comments and fix code compilation 2020-08-29 20:56:51 +02:00
Lioncash 1aba91e993 bootmanager: Prevent unnecessary copies in TouchUpdateEvent()
The list of points is returned by const reference, so we don't need to
make a copy of every element in the list.
2020-08-29 14:33:10 -04:00
Lioncash fae65d8a72 game_list_p: Avoid string churn in GameListItemPath data() 2020-08-29 14:30:49 -04:00
Lioncash cde658cb27 game_list_p: Mark some constants as constexpr
Consistency change with how we mark constants in the rest of the
codebase.
2020-08-29 14:23:41 -04:00
FearlessTobi e6bd1fd1b8 yuzu: Add motion and touch configuration 2020-08-29 18:56:34 +02:00
LC ce43139eb7
Merge pull request #4604 from lioncash/lifetime
yuzu/main: Amend lifetime issues with InputSubsystem
2020-08-29 01:33:29 -04:00
Lioncash bcd3c79eca yuzu/main: Amend lifetime issues with InputSubsystem
Due to the way Qt performs destruction of parent/child widgets, we need
to make the lifetime of the input subsystem shared across the main
window and the render window.
2020-08-29 00:58:11 -04:00
Morph 403e36fab2 yuzu/configuration: Fix index out of bounds for default_analogs 2020-08-29 00:24:47 -04:00
Lioncash 69fa6b4906 sdl_impl: Reduce allocations in GetButtonMappingForDevice()
These maps can be constexpr arrays of std::pair.
2020-08-28 21:24:17 -04:00
Lioncash f2a680ca89 sdl_impl: Make use of std::move on std::string where applicable
Avoids redundant copies.
2020-08-28 21:14:54 -04:00
Lioncash e92164e6a0 sdl_impl: Make use of insert_or_assign() where applicable
Avoids churning ParamPackage instances.
2020-08-28 21:13:26 -04:00
Lioncash f3ac088345 sdl_impl: Prevent type truncation in BuildAnalogParamPackageForButton() default arguments
We need to add the 'f' suffix to make the right hand side a float and
not a double.
2020-08-28 21:08:08 -04:00
Lioncash 2e2dde2f95 sdl_impl: Simplify make_tuple call
The purpose of make_tuple is that you don't need to explicitly type out
the types of the things that comprise said tuple.

Given this just returns default values, we can simplify this a bit.
2020-08-28 21:04:18 -04:00
Lioncash 2680526e6b sdl_impl: Mark FromEvent() as a const member function
This doesn't modify internal member state, so it can be marked as const.
2020-08-28 20:58:49 -04:00
LC 57d9ef5a89
Merge pull request #4600 from lioncash/prototype
input_common/main: Remove unimplemented prototype
2020-08-28 20:10:33 -04:00
Lioncash 98f5d8a713 input_common/main: Remove unnecessary headers 2020-08-28 19:23:19 -04:00
Lioncash 4b9b203c09 input_common/main: Remove unimplemented prototype
I forgot to remove this in the rebase when removing most of the global
variables within the input common codebase.
2020-08-28 19:11:17 -04:00
ReinUsesLisp fe90c4fd7b vk_device: Blacklist AMD proprietary from VK_EXT_extended_dynamic_state
Vertex binding's <stride> is bugged on AMD's proprietary drivers when
using VK_EXT_extended_dynamic_state. Blacklist it for now while we
investigate how to report this issue to AMD.
2020-08-28 19:14:57 -03:00
bunnei 45b73ba840
Merge pull request #4544 from lioncash/input-sub
input_common: Eliminate most global state
2020-08-28 09:57:50 -04: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