Commit graph

14794 commits

Author SHA1 Message Date
bunnei 85cfd96f62
Merge pull request #5247 from comex/xx-concepts
k_priority_queue: Fix concepts use
2020-12-29 16:50:20 -08:00
bunnei 82e0eeed21 hle: kernel: service_thread: Make thread naming more consistent. 2020-12-29 16:46:29 -08:00
bunnei a2a0f5318d hle: kernel: Manage service threads on another thread.
- This is to allow service threads to defer destruction of themselves.
2020-12-29 16:46:29 -08:00
bunnei 69e82d01d5 common: ThreadWorker: Add class to help do asynchronous work. 2020-12-29 16:46:29 -08:00
bunnei b02464f685
Merge pull request #5246 from comex/xx-include
Add missing include of "core/hle/kernel/kernel.h"
2020-12-29 16:43:17 -08:00
bunnei c192da3f82 hle: kernel: Manage host thread IDs using TLS.
- Avoids the need to have a large map of host to guest thread IDs.
2020-12-29 15:55:30 -08:00
comex 388cf58b31 k_priority_queue: Fix concepts use
- For `std::same_as`, add missing include of `<concepts>`.

- For `std::convertible_to`, create a replacement in `common/concepts.h`
  and use that instead.

  This would also be found in `<concepts>`, but unlike `std::same_as`,
  `std::convertible_to` is not yet implemented in libc++, LLVM's STL
  implementation - not even in master.  (In fact, `std::same_as` is the
  *only* concept currently implemented.  For some reason.)
2020-12-29 14:33:41 -05:00
comex b36896b90e Add missing include of "core/hle/kernel/kernel.h"
This is needed as the header invokes methods on KernelCore.
2020-12-29 14:22:35 -05:00
LC aa87278bf0
Merge pull request #5245 from ameerj/sleepthread-log
svc: demote SleepThread log to LOG_TRACE
2020-12-29 14:03:24 -05:00
ameerj 0383363a8f svc: demote SleepThread log to LOG_TRACE
This log is called often, and introduces a lot of noise when debug logging is enabled, making it difficult to see other debug logs.
2020-12-29 14:01:56 -05:00
bunnei 22ba437aa4
Merge pull request #5236 from gal20/udp_client_patch
input_common: process udp packets only for the correct pad
2020-12-29 02:51:40 -08:00
bunnei dfdac7d38a hle: kernel: Move ServiceThread ownership to KernelCore.
- Fixes a circular dependency which prevented threads from being released on shutdown.
2020-12-29 01:12:39 -08:00
bunnei f57be2e626 hle: kernel: service_thread: Add thread name and take weak_ptr of ServerSession. 2020-12-29 01:06:39 -08:00
bunnei 7d77a3f88f hle: service: Acquire and release a lock on requests.
- This makes it such that we can safely access service members from CoreTiming thread.
2020-12-28 21:33:34 -08:00
bunnei c7a06908ae audio_core: stream: Ensure buffer is valid before release. 2020-12-28 21:33:34 -08:00
bunnei 06f8c3dc01 core: Do not reset device_memory on shutdown.
- This will be reset on initialization.
2020-12-28 21:33:34 -08:00
bunnei d0649d0971 core: hle: kernel: Clear process list on boot. 2020-12-28 21:33:34 -08:00
bunnei 954341763a gpu: gpu_thread: Ensure MicroProfile is shutdown on exit. 2020-12-28 21:33:34 -08:00
bunnei 994a9fec4e hle: service: vi: Refactor to grab buffer only once. 2020-12-28 21:33:34 -08:00
bunnei 6433b1dfd6 service: nvflinger: Improve synchronization for BufferQueue.
- Use proper mechanisms for blocking on DequeueBuffer.
- Ensure service thread terminates on emulation Shutdown.
2020-12-28 21:33:34 -08:00
bunnei bea51d948d hle: service: Ensure system is powered on before writing IPC result. 2020-12-28 16:33:48 -08:00
bunnei 6d2f9428c5 core: kernel: Clear process list earlier. 2020-12-28 16:33:48 -08:00
bunnei 4991620f89 video_core: gpu_thread: Do not wait when system is powered down. 2020-12-28 16:33:48 -08:00
bunnei 916438a9de core: settings: Untangle multicore from asynchronous GPU.
- Now that GPU is always threaded, we can support multicore with synchronous GPU.
2020-12-28 16:33:48 -08:00
bunnei 40571c073f video_core: gpu: Implement synchronous mode using threaded GPU. 2020-12-28 16:33:48 -08:00
bunnei 14c825bd1c video_core: gpu: Refactor out synchronous/asynchronous GPU implementations.
- We must always use a GPU thread now, even with synchronous GPU.
2020-12-28 16:33:48 -08:00
bunnei 5d4715cc6a hle: kernel: hle_ipc: Remove SleepClientThread.
- This was kind of hacky, and no longer is necessary with service threads.
2020-12-28 16:33:48 -08:00
bunnei 87d6588cb5 hle: service: bsd: Update to work with service threads, removing SleepClientThread. 2020-12-28 16:33:48 -08:00
bunnei 0c81b83ca9 hle: service: nvdrv: Revert #4981 to remove usage of SleepClientThread.
- Note, this always processes the ioctl right away, which fixes BotW 1.0.0 issues.
2020-12-28 16:33:48 -08:00
bunnei 8bc3d66354 hle: kernel: service_thread: Add parameter for thread pool size. 2020-12-28 16:33:47 -08:00
bunnei 19a8f03ad5 hle: service: nvflinger: Refactor locking and interfaces. 2020-12-28 16:33:47 -08:00
bunnei b377da042b hle: service: vi: Remove usage of SleepClientThread. 2020-12-28 16:33:47 -08:00
bunnei 28281ae250 core: hle: server_session: Use separate threads for each service connection. 2020-12-28 16:33:47 -08:00
gal20 1defd0847a udp client: process packets only for the correct pad 2020-12-27 22:22:48 +02:00
german 80fece4e08 Allow to invert analog axis with right click 2020-12-26 17:46:14 -06:00
Rodrigo Locatti 0dc4ab42cc
Merge pull request #5226 from ReinUsesLisp/c4715-vc
video_core: Enforce C4715 (not all control paths return a value)
2020-12-25 03:11:47 -03:00
Rodrigo Locatti 453560fb3a
Merge pull request #5225 from ReinUsesLisp/always-vulkan
cmake: Always enable Vulkan
2020-12-25 02:52:29 -03:00
bunnei c8a4967c9d
core: memory: Ensure thread safe access when pages are rasterizer cached (#5206)
* core: memory: Ensure thread safe access when pages are rasterizer cached.
2020-12-24 21:51:49 -08:00
ReinUsesLisp 1b9e08ab78 cmake: Always enable Vulkan
Removes the unnecesary burden of maintaining separate #ifdef paths and
allows us sharing generic Vulkan code across APIs.
2020-12-24 21:07:24 -03:00
ReinUsesLisp 1e191cc837 video_core: Enforce C4715 (not all control paths return a value)
Most of the time people write code that always returns a value,
terminates execution, throws an exception, or uses an unconventional
jump primitive.

This is not always true when we build without asserts on mainline builds.
To avoid introducing undefined behavior on our most used builds, enforce
this warning signalling an error and stopping the build from shipping.
2020-12-24 21:01:23 -03:00
ReinUsesLisp 5dbda22659 vk_shader_decompiler: Silence warning when compiling without asserts 2020-12-24 21:01:09 -03:00
bunnei 5836530a87
Merge pull request #5217 from lat9nq/save-on-boot
yuzu/main: Save settings when starting guest
2020-12-23 01:45:24 -08:00
lat9nq 17badbc442 yuzu/main: Improve menubar access keys
Adds a unique access key to each action within each menu. A few actions
already had their own access key, so those were untouched.
2020-12-22 19:32:58 -05:00
german 64fad8cfe9 Add option to reset window size to 1080p 2020-12-22 17:06:48 -06:00
bunnei 29ccc7673f
Merge pull request #5042 from Morph1984/project-aether
Project Aether: Reimplementation of the Web Browser Applet
2020-12-21 23:47:10 -08:00
lat9nq c243932b41 yuzu/main: Save settings when starting guest
Saves UISettings and Settings when booting a guest. Moves updating
UISettings::values from GMainWindow::closeEvent into its own function,
then reuses it in GMainWindow::BootGame.
2020-12-22 02:29:30 -05:00
bunnei 1279c7ce7a
Merge pull request #5131 from bunnei/scheduler-rewrite
Rewrite Kernel scheduler based on Atmosphere
2020-12-20 20:57:54 -08:00
bunnei c3e201a829
Merge pull request #5201 from ameerj/bufferq-refactor
vi/buffer_queue: Buffer queue management refactor
2020-12-20 15:48:39 -08:00
FearlessTobi 10b0ab7926 yuzu: Remove gdbstub configuration
The gdbstub itself was removed with https://github.com/yuzu-emu/yuzu/pull/5028.
This PR just removes the remaining gdb configuration code from the emulator and the UI.
2020-12-19 19:19:42 +01:00
Morph 82fa9f8d56 applets/web: Implement the online web browser applet 2020-12-18 10:33:28 -05:00
Morph 51cddcb8b8 applets/web: Fix keyboard to emulated controller input 2020-12-18 10:33:28 -05:00
Morph 2ddd83cdfe main: Add the ability to disable the web applet
This should only be used for Super Mario 3D All-Stars. This is a temporary solution until it can be implemented properly.
2020-12-18 10:33:28 -05:00
Morph 8b95bf041d main, applets/web: Re-add progress dialog for RomFS extraction 2020-12-18 10:33:28 -05:00
Morph 93cb783853 applets/web: Implement the Qt web browser applet frontend 2020-12-18 10:33:28 -05:00
Morph d5e0923e3d web_browser_scripts: Add injection scripts for the web browser 2020-12-18 10:33:28 -05:00
Morph d46ca5a015 pl_u, applets/web: Decrypt shared fonts to TTF files 2020-12-18 10:33:28 -05:00
Morph 46183294b2 ns_vm: Stub NeedsUpdateVulnerability
This is used to force system updates on launching the web browser. We do not care about system updates so this can be set to false.
2020-12-18 10:33:28 -05:00
Morph f9653a4417 frontend/input_interpreter: Add InputInterpreter API
The InputInterpreter class interfaces with HID to retrieve button press states. Input is intended to be polled every 50ms so that a button is considered to be held down after 400ms has elapsed since the initial button press and subsequent repeated presses occur every 50ms.

Co-authored-by: Chloe <25727384+ogniK5377@users.noreply.github.com>
2020-12-18 10:33:28 -05:00
Morph 54ea3c47c8 controllers/npad: Make press_state atomic 2020-12-18 10:33:28 -05:00
Morph 5836786246 util: Add URL Request Interceptor for QWebEngine 2020-12-18 10:33:28 -05:00
Morph 51a7681957 bootmanager: Add a check whether loading is complete 2020-12-18 10:33:28 -05:00
Morph d6d1a8e02c applets/web: Implement the default web browser applet frontend 2020-12-18 10:33:28 -05:00
Morph 89df483567 applets/web: Implement the offline browser applet backend 2020-12-18 10:33:27 -05:00
Morph a5750f437d applets/web: Initial implementation of the web browser applet 2020-12-18 10:33:27 -05:00
Morph ccb439efb0 applets: Remove the previous web browser applet implementation 2020-12-18 10:33:27 -05:00
Morph 79316be18c system_archive: Add + and - buttons to the Nintendo Extended OSS font 2020-12-18 02:55:48 -05:00
ameerj 873ad1272e buffer_queue: better use of std::array 2020-12-18 00:12:14 -05:00
ameerj 8cb683f3b9 Overwrite slots instead of queuing them, add disconnect signal
Fix for Katana Zero and Yoshi's Crafted World
2020-12-17 14:22:46 -05:00
Morph 5d29d2111c system_archive: Update Nintendo Extended OSS font
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-12-17 08:58:13 -05:00
bunnei f3db273753
Merge pull request #5190 from Morph1984/validate_device_handle
controllers/npad: Validate device handles before use
2020-12-15 16:40:11 -08:00
bunnei 2e1b998d5e
Merge pull request #5119 from Morph1984/fs-opendatastoragewithprogramindex
fsp_srv: Implement OpenDataStorageWithProgramIndex
2020-12-15 11:07:03 -08:00
bunnei 37bec068c2
Merge pull request #5157 from lioncash/array-dirty
maxwell_3d: Remove unused dirty_pointer array
2020-12-15 00:35:47 -08:00
bunnei df6427d30b
Merge pull request #5168 from Morph1984/aoc-PurchaseEventManager
aoc_u: Stub IPurchaseEventManager and its service commands
2020-12-14 16:08:38 -08:00
lat9nq 292dd642ce cmake: Fix generating CMake configs and linking with Boost
Fixes regression by 761206cf81, causing
yuzu to not build on Linux with any version of Boost except a cached
1.73 Conan version from before about a day ago.

Moves the Boost requirement out of the `REQUIRED_LIBS` psuedo-2D-array
for Conan to instead be manually configured, using Conan as a fallback
solution if the system does not meet our requirements.

Requires any update from the linux-fresh container in order to build.

**DO NOT MERGE** until someone with the MSVC toolchain can verify this
works there, too.
2020-12-13 01:28:51 -05:00
bunnei 761206cf81
common: Update CMakeList to fix build issue with Boost. 2020-12-12 11:50:07 -08:00
Morph 1c773c0869 controllers/npad: Validate device handles before use
Some games such as NEKOPARA Vol. 3 send invalid device handles when calling InitializeVibrationDevice. Introduce a check to validate the device handle before use.
2020-12-12 07:05:38 -05:00
bunnei 69b46dd607
Merge pull request #5183 from lioncash/alias2
vfs: Use existing type aliases consistently
2020-12-12 01:54:28 -08:00
bunnei c918c6480f
Merge pull request #5187 from Morph1984/revert-stdfs
fs: Revert all std::filesystem changes
2020-12-11 20:07:37 -08:00
bunnei 37194dd4e9
Merge pull request #5172 from lioncash/svc-wide
svc: Remove unnecessary casts
2020-12-11 17:39:30 -08:00
Morph 4de079b256 Revert "Merge pull request #5173 from lioncash/common-fs"
This reverts commit ce5fcb6bb2, reversing
changes made to 6f41763061.
2020-12-11 20:24:22 -05:00
Morph 8941cdb7d2 Revert "Merge pull request #5174 from ReinUsesLisp/fs-fix"
This reverts commit 5fe55b16a1, reversing
changes made to e94dd7e2c4.
2020-12-11 20:24:22 -05:00
Morph dfee6321cd Revert "Merge pull request #5176 from Morph1984/fix-createfile"
This reverts commit 6d6115475b, reversing
changes made to 5fe55b16a1.
2020-12-11 20:24:22 -05:00
Morph 0195038c07 Revert "Merge pull request #5179 from ReinUsesLisp/fs-path"
This reverts commit 4e94d0d53a, reversing
changes made to 6d6115475b.
2020-12-11 20:21:46 -05:00
Morph ac3ec5ed13 Revert "Merge pull request #5181 from Morph1984/5174-review"
This reverts commit cdb36aef9e, reversing
changes made to 5e9b77129f.
2020-12-11 20:21:21 -05:00
bunnei cdb36aef9e
Merge pull request #5181 from Morph1984/5174-review
common/file_util: Address review comments of #5174
2020-12-10 15:52:11 -08:00
bunnei 2d47a5fd41
Merge pull request #5123 from Morph1984/nim-IsLargeResourceAvailable
nim: Stub IsLargeResourceAvailable
2020-12-10 11:34:18 -08:00
bunnei d1a2b3fb18
Merge pull request #5162 from lioncash/copy-shader
gl_shader_decompiler: Elide unnecessary copies within DeclareConstantBuffers()
2020-12-10 00:11:11 -08:00
Lioncash b1657b8c6b vfs: Use existing type aliases consistently
Makes use of the VirtualDir and VirtualFile aliases across the board
instead of having a few isolated places that don't use it.
2020-12-10 01:44:43 -05:00
Morph ec8548b414 common/file_util: Simplify the behavior of CreateFullPath 2020-12-09 19:28:11 -05:00
ReinUsesLisp bab9cae71f common/file_util: Let std::filesystem cast from UTF16 to std::string
Fix invalid encoding paths when iterating over a directory on Windows.
2020-12-09 18:52:36 -03:00
Morph b06d6e3646 vfs_real: Fix CreateFile for files without a file extension 2020-12-09 06:34:49 -05:00
ReinUsesLisp 5329834376 common/file_util: Fix and deprecate CreateFullPath, add CreateDirs
Fix CreateFullPath to have its intended previous behavior (whatever
that was), and deprecate it in favor of the new CreateDirs function.

Unlike CreateDir, CreateDirs is marked as [[nodiscard]] to avoid new
code ignoring its result value.
2020-12-09 05:42:03 -03:00
ReinUsesLisp 52f13f2339 common/file_util: Succeed on CreateDir when the directory exists 2020-12-09 05:21:08 -03:00
Rodrigo Locatti e94dd7e2c4
Merge pull request #5142 from comex/xx-poll-events
network, sockets: Replace `POLL_IN`, `POLL_OUT`, etc. constants with an `enum class PollEvents`
2020-12-09 03:52:20 -03:00
Rodrigo Locatti ce5fcb6bb2
Merge pull request #5173 from lioncash/common-fs
common/file_util: Make use of std::filesystem
2020-12-09 03:47:21 -03:00
Lioncash 20aad9e01a file_util: Migrate remaining file handling functions over to std::filesystem
Converts creation and deletion functions over to std::filesystem,
simplifying our file-handling code.

Notably with this, CopyDir will now function on Windows.
2020-12-09 01:24:05 -05:00
bunnei 6f41763061
Merge pull request #5166 from lioncash/log-cast
core: Remove unnecessary enum casts in log calls
2020-12-08 21:58:13 -08:00
bunnei 05a703e15d
Merge pull request #5135 from Morph1984/applets-shadow
applets: Resolve variable shadowing
2020-12-08 17:43:59 -08:00
Lioncash 0e54aa17e6 file_util: Migrate Exists() and IsDirectory() over to std::filesystem
Greatly simplifies our file-handling code for these functions.
2020-12-08 18:36:53 -05:00
Lioncash 2de124e223 svc: Remove unnecessary casts
Simplifies and removes some casts. In all cases, these were generally
widening from a 32-bit unsigned type to a 64-bit unsigned type, so no
information would be lost from the conversion.
2020-12-08 15:42:10 -05:00