Commit graph

18051 commits

Author SHA1 Message Date
lat9nq ddc47e6df8 cmake: General improvements to libusb linking
Delegates libusb external communication to externals/CMakeLists.txt
Ensures an interface library `usb` for every pathway
input_common just links to the `usb` library now
externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb
finding
Other minor cleanup
2021-06-03 03:49:35 -04:00
lat9nq 55dd027115 cmake: Use autotools to build libusb generally for GNU
Building libusb was also broken on GCC (and maybe Clang) on our
CMakeLists after upgrading to 1.0.24, but it was not being checked
because our 18.04 container had libusb installed on it.
This builds on the MinGW work from earlier and extends it to the rest of
the GNU toolchains. In addition we make use of pkg-config when present
to find libusb. pkg-config is preferrable because we can specify a
minimum required version.
2021-06-03 02:49:53 -04:00
lat9nq c41451af75 yuzu qt: Revert some usages of string_view
Causes a heap-use-after free reported by AddressSanitizer. This makes
use of std::filesystem::path, but due to that we have to use their
string() function which may not work for all characters.
2021-06-02 19:50:20 -04:00
Morph 377cd301b3
Merge pull request #6395 from lioncash/result-move
common_funcs: Move R_ macros to result.h
2021-06-02 00:34:48 -04:00
Mai M 50866199a4
Merge pull request #6397 from Morph1984/fs_util
common: fs: fs_util: Add more string conversion functions
2021-06-02 00:28:34 -04:00
Morph dba7bcd489 common: fs: fs_util: Move PathToUTF8String to fs_util 2021-06-02 00:26:26 -04:00
Morph a1eeb9908d common: fs: fs_util: Add more string conversion functions 2021-06-02 00:26:26 -04:00
bunnei 91f559a71f
Merge pull request #6361 from lat9nq/per-hb-cfg
yuzu qt: Handle per-game configs for title id 0
2021-06-01 17:24:08 -07:00
Morph 65b389da70
Merge pull request #6396 from lat9nq/mingw-sdl-fix
externals: Use defaults for building SDL2 on WIN32
2021-06-01 04:14:08 -04:00
bunnei 348ca07e0d
Merge pull request #6318 from german77/dualJoycon
input_common: Add dual joycon support
2021-06-01 00:51:00 -07:00
bunnei 0a6f685ad0
Merge pull request #6367 from ReinUsesLisp/vma-host
vulkan_memory_allocator: Allow textures to be allocated in host memory
2021-05-31 23:35:11 -07:00
Lioncash 3aed797466 common_funcs: Move R_ macros to result.h
These macros all interact with the result code type, so they should
ideally be within this file as well, so all the common_funcs machinery
doesn't need to be pulled in just to use them.
2021-05-31 16:41:00 -04:00
lat9nq 185e405bc1 externals: Use defaults for building SDL2 on WIN32
Whatever those settings do breaks controller detection on Windows, at
least with the MinGW container. If-guard it against WIN32 and just let
SDL2 configure using its defaults, aside from static linking.
2021-05-31 15:26:25 -04:00
Ameer J 519ddfae04
Merge pull request #6394 from lat9nq/mingw-fix
externals: libusb: Use autotools for MinGW
2021-05-31 14:28:56 -04:00
lat9nq 1914a1d21c externals: libusb: Use autotools for MinGW
After updating to 1.0.24, MinGW fails to build libusb as a result of
numerous errors. So we build libusb their way and let them update the
nontrivial stuff.

This only applies to MinGW: the old path is still in use for Linux
toolchains as well as MSVC.

This will dynamically link libusb, since I hit build errors with the old
way we used to resolve the conflict with SDL2.
2021-05-31 13:57:06 -04:00
bunnei f34176996e
Merge pull request #6385 from degasus/save_memory_access
core/memory: Check our memory fallbacks for out-of-bound behavior.
2021-05-30 23:21:39 -07:00
bunnei 95f45112e9
Merge pull request #6344 from german77/update-libusb
Update libusb to 1.0.24
2021-05-30 01:36:46 -07:00
bunnei a5ebba7e36
Merge pull request #6377 from lioncash/point
common: Extract Point struct into common
2021-05-30 01:35:26 -07:00
bunnei a6cfc73cb2
Merge pull request #6387 from lioncash/class-token
k_class_token: Use variable templates where applicable
2021-05-29 23:55:17 -07:00
bunnei 90c3dd300f
Merge pull request #6386 from bunnei/shutdown-fix
video_core: gpu: WaitFence: Do not block threads during shutdown.
2021-05-29 23:52:52 -07:00
bunnei f072f48806
ci: build-msvc: Remove CMake install step.
- This is breaking our build pipelines with Zydis (dynarmic dependency).
2021-05-29 22:49:02 -07:00
Mai M 2069430baa
Merge pull request #6374 from Morph1984/swkbd-textcheck-encoding
applets/swkbd: Only read the text check message on Failure/Confirm
2021-05-29 23:34:40 -04:00
Mai M fc708b396b
Merge pull request #6364 from german77/stub-lp2p
ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService

Mario Kart Live: Home Circuit needs lp2p:sys lp2p:app INetworkServiceMonitor INetworkService to be able to progress.

Note: The game still fails to boot from unimplemented LDN and BSD services.
2021-05-29 23:33:57 -04:00
bunnei e41c8b6780
Merge pull request #6379 from degasus/update_dynarmic
externals: Update dynarmic.
2021-05-29 03:15:13 -07:00
Lioncash 646622ccd4 k_class_token: Use variable templates where applicable
Same behavior, less code.
2021-05-29 05:25:34 -04:00
bunnei c7c4ef9d43
Merge pull request #6384 from lioncash/virtual
kernel: Add missing override specifiers
2021-05-29 02:11:40 -07:00
bunnei cdabc9064b
Merge pull request #6382 from lioncash/null
k_thread: Move dereference after null check in Initialize()
2021-05-29 01:17:28 -07:00
bunnei 8592f8a2b4 video_core: gpu: WaitFence: Do not block threads during shutdown.
- Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur.
- Commonly observed when stopping emulation in Super Mario Odyssey.
2021-05-29 01:06:04 -07:00
Markus Wick 42a7c5d017 core/memory: Check our memory fallbacks for out-of-bound behavior.
This makes it by far harder to crash yuzu.

Also implement the 48bit masking of AARCH64 while touching this code.
2021-05-29 09:28:26 +02:00
bunnei 5388e6db84
Merge pull request #6373 from bunnei/use-slabheap-tls
hle: kernel: KSlabHeap: Allow host or guest allocations.
2021-05-29 00:17:24 -07:00
Mai M 38dbe57797
Merge pull request #6383 from degasus/fix_gcc_warnings
Fix two GCC 11 warnings: Unneeded copies.
2021-05-29 03:08:11 -04:00
Markus Wick ddb186e61d core/arm_interface: Improve the performance of memory fallbacks.
We just create one memory subsystem. This is a constant all the time.
So there is no need to call the non-inlined parent.Memory() helper on every callback.
2021-05-29 09:02:19 +02:00
Lioncash 7b2917b4e1 kernel: Add missing override specifiers
Over the course of the kernel refactoring a tiny bit of missing
overrides slipped through review, so we can add these.

While we're at it, we can remove redundant virtual keywords where
applicable as well.
2021-05-29 02:58:32 -04:00
Markus Wick 5a8cd1b118 Fix two GCC 11 warnings: Unneeded copies.
std::move created an unneeded copy.
iterating without reference also created copies.
2021-05-29 08:57:44 +02:00
Markus Wick d2d7a5060f externals: Update dynarmic.
The new version supports fastmem on a64.
2021-05-29 08:53:01 +02:00
Lioncash 16ff0161b3 k_thread: Move dereference after null check in Initialize()
Prevents a -Wnonnull warning on GCC.
2021-05-29 00:31:38 -04:00
bunnei 420b1f89d3
Merge pull request #6371 from degasus/drop_ExceptionalExit
core/arm_interface: Call SVC after end of dynarmic block.
2021-05-28 17:45:05 -07:00
bunnei ee099b2697 hle: kernel: KSlabHeap: Allow host or guest allocations.
- Use host allocations for kernel memory, as this is not properly emulated yet.
- Use guest allocations for TLS, as this needs to be backed by DeviceMemory.
2021-05-28 17:42:41 -07:00
bunnei 945effcc75
Merge pull request #6356 from ogniK5377/ApplyNpadSystemCommonPolicy
hid: ApplyNpadSystemCommonPolicy
2021-05-28 10:05:20 -07:00
Lioncash 5554de3933 touchscreen: Make use of common point struct 2021-05-28 08:15:22 -04:00
Lioncash 8171ad65cd common: Extract point into a common struct
This is generic enough that it can be moved into the Common class for
reuse.
2021-05-28 08:12:49 -04:00
Morph d25648cb6c
Merge pull request #6375 from lioncash/iofs
common/fs/file: Default initialize IOFile members
2021-05-28 02:43:33 -04:00
Lioncash 210c2c9a56 common/fs/file: Explicitly delete copy constructors
Relocates them to the same place the move equivalents are at for
consistent viewing.
2021-05-28 01:49:40 -04:00
Lioncash 6806a893bd common/fs/file: Devirtualize destructor
IOFile is a final class, so there's no need for a virtual destructor.
2021-05-28 01:47:52 -04:00
Lioncash 019bc9f6b2 common/fs/file: Default initialize IOFile members
Prevents a potential uninitialized read vector in the move constructor.
2021-05-28 01:46:30 -04:00
Morph c68255f70f applets/swkbd: Make use of std::move where applicable
Avoids redundant string copies
2021-05-27 23:45:56 -04:00
Morph 247cd92216 applets/swkbd: Only read the text check message on Failure/Confirm
Applications may leave this region of memory uninitialized when the text check result is not either Failure or Confirm.
Attempting to read uninitialized memory may cause an exception within the UTF16 to UTF8 string converter.
Fix this by only reading the text check message on Failure or Confirm.
2021-05-27 23:45:56 -04:00
bunnei 3289abe1cc
Merge pull request #6372 from bunnei/raster-cache-fix
video_core: rasterizer_cache: Use u16 for cached page count.
2021-05-27 15:48:21 -07:00
bunnei 4b95b0df97 video_core: rasterizer_cache: Use u16 for cached page count.
- Greatly reduces the risk of overflow, at the cost of doubling the size of this array.
2021-05-27 14:47:24 -07:00
Markus Wick 3d2e80daed core/arm_interface: Call SVC after end of dynarmic block.
So we can modify all of dynarmic states within SVC without ExceptionalExit.

Especially as the ExceptionalExit hack is dropped on upstream dynarmic.
2021-05-27 23:23:23 +02:00