Commit graph

7212 commits

Author SHA1 Message Date
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
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
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
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
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
bunnei
2d47a5fd41
Merge pull request #5123 from Morph1984/nim-IsLargeResourceAvailable
nim: Stub IsLargeResourceAvailable
2020-12-10 11:34:18 -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
b06d6e3646 vfs_real: Fix CreateFile for files without a file extension 2020-12-09 06:34:49 -05: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
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
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
bunnei
6057dc46e5
Merge pull request #5167 from lioncash/doc-memory
memory: Resolve -Wdocumentation warning for Write()
2020-12-08 11:47:04 -08:00
Morph
deff708cbe IPurchaseEventManager: Implement GetPurchasedEventReadableHandle
- Used by Pokémon Café Mix
- Used by DOOM: Eternal
2020-12-08 13:39:19 -05:00
Morph
a9cfe06aaf IPurchaseEventManager: Stub Set(Default)DeliveryTarget
- Used by Pokémon Café Mix
- Used by DOOM: Eternal
2020-12-08 13:39:13 -05:00
Morph
009bdb3558 aoc_u: Stub Create(Permanent)EcPurchasedEventManager
- Used by Pokémon Café Mix
- Used by DOOM: Eternal
2020-12-08 13:39:07 -05:00
Lioncash
a44ff5ed31 memory: Resolve -Wdocumentation warning for Write()
Write() doesn't return anything, so the @returns tag shouldn't be
present.
2020-12-08 12:44:58 -05:00
Morph
e15039372e fsp_srv: Implement OpenDataStorageWithProgramIndex
- Used by RollerCoaster Tycoon 3: Complete Edition
2020-12-08 08:19:05 -05:00
Morph
0eb6c6cd83 file_sys: Consolidate common Title ID operations 2020-12-08 08:19:05 -05:00
Morph
51e6f8271a
Merge pull request #5165 from lioncash/copy-controller
controller: Avoid unnecessary copies in ConfigurationComplete()
2020-12-08 20:48:45 +08:00
Lioncash
6b7320add4 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.
2020-12-07 23:02:23 -05:00
Lioncash
215cfbb757 controller: Use std::move within ConvertToFrontendParameters()
Avoids unnecessary copies.
2020-12-07 22:04:16 -05:00
Lioncash
97dd67ad1c controller: Avoid unnecessary copies in ConfigurationComplete()
Avoids unnecessary 1072 byte copies when querying info about
controllers.
2020-12-07 22:02:58 -05:00
Morph
607bb8d14b
Merge pull request #5020 from german77/AnalogfromButtonFix
Disable analog joystick from buttons by default
2020-12-08 10:30:21 +08:00
german
b57ba7bfb6 Disable analog joystick from buttons by default 2020-12-07 19:34:52 -06:00
bunnei
f782aecf4d
Merge pull request #5153 from comex/xx-unix
CMakeLists,network: Create YUZU_UNIX macro to replace __unix__
2020-12-07 15:32:06 -08:00
bunnei
a58d57a60d
Merge pull request #5148 from comex/xx-unused-fields
core: Mark unused fields as [[maybe_unused]]
2020-12-06 22:33:00 -08:00
bunnei
24cabf5e2f
Merge pull request #5154 from comex/xx-ipc
hle: Type check ResponseBuilder::Push arguments, and fix use in vi.cpp
2020-12-06 22:32:04 -08:00
LC
8a00a0ade6
Merge pull request #5147 from comex/xx-purevirt
nvdrv: Remove useless re-declaration of pure virtual methods that were already declared in the superclass
2020-12-07 00:08:46 -05:00
LC
43f0b42088
Merge pull request #5150 from comex/xx-boxcat
boxcat: Avoid unnecessary object copy
2020-12-07 00:07:39 -05:00
LC
69af6ada2f
Merge pull request #5136 from lioncash/video-shadow3
video_core: Resolve more variable shadowing scenarios pt.3
2020-12-07 00:06:53 -05:00
comex
0791082b43 network, sockets: Replace POLL_IN, POLL_OUT, etc. constants with an enum class PollEvents
Actually, two enum classes, since for some reason there are two separate
yet identical `PollFD` types used in the codebase.  I get that one is
ABI-compatible with the Switch while the other is an abstract type used
for the host, but why not use `WSAPOLLFD` directly for the latter?

Anyway, why make this change?  Because on Apple platforms, `POLL_IN`,
`POLL_OUT`, etc. (with an underscore) are defined as macros in
<sys/signal.h>.  (This is inherited from FreeBSD.)  So defining
a variable with the same name causes a compile error.

I could just rename the variables, but while I was at it I thought I
might as well switch to an enum for stronger typing.

Also, change the type used for values copied directly to/from the
`events` and `revents` fields of the host *native*
`pollfd`/`WSASPOLLFD`, from `u32` to `short`, as `short` is the correct
canonical type on both Unix and Windows.
2020-12-06 19:14:42 -05:00
comex
e31cb50405 Fix "explicitly defaulted but implicitly deleted" warning
`PhysicalCore`'s move assignment operator was declared as `= default`,
but was implicitly deleted because `PhysicalCore` has fields
of reference type.  Switch to explicitly deleting it to avoid a Clang
warning.

The move *constructor* is still defaulted, and is required to exist due
to the use of `std::vector<PhysicalCore>`.
2020-12-06 19:02:04 -05:00
comex
3373149fdc hle: Type check ResponseBuilder::Push arguments, and fix use in vi.cpp
- Add a type check so that calling Push with an invalid type produces a
  compile error rather than a linker error.

- vi.cpp was calling Push with a variable of type `std::size_t`.
  There's no explicit overload for `size_t`, but there is one for `u64`,
  which on most platforms is the same type as `size_t`.  On macOS,
  however, it isn't: both types are 64 bits, but `size_t` is `unsigned
  long` and `u64` is `unsigned long long`.  Regardless, it makes more
  sense to explicitly use `u64` here instead of `size_t`.
2020-12-06 18:59:22 -05:00
comex
0e122c13ad CMakeLists,network: Create YUZU_UNIX macro to replace __unix__
__unix__ is not predefined on Apple platforms even though they are Unix.
2020-12-06 18:56:40 -05:00
comex
feac654ba0 core: Mark unused fields as [[maybe_unused]] 2020-12-06 18:36:10 -05:00
comex
5cb1a343d1 boxcat: Avoid unnecessary object copy 2020-12-06 18:31:13 -05:00
comex
716ae72aac nvdrv: Remove useless re-declaration of pure virtual methods that were already declared in the superclass 2020-12-06 18:24:33 -05:00
bunnei
1bdb756d28 hle: kernel: Process: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
d4ae0ae0e9 core: cpu_manager: Fix a typo in PreemptSingleCore, which broke many games.
- We were reload'ing the old current scheduler, which may have changed.
2020-12-06 00:27:13 -08:00
bunnei
9b492430bb hle: kernel: Thread: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
ed4d1e2ade hle: kernel: KScopedSchedulerLockAndSleep: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
b1b4f2337e hle: kernel: KScopedLock: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
165d8485f0 hle: kernel: KAbstractSchedulerLock: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
960500cfd2 hle: kernel: KScheduler: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
8fd921557f hle: kernel: KPriorityQueue: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
4d3be1816c hle: kernel: KAffinityMask: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
357d79fb6e hle: kernel: GlobalSchedulerContext: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
b1326d9230 hle: kernel: Use C++ style comments in KScheduler, etc. 2020-12-06 00:03:24 -08:00
bunnei
bc59ca92b6 kernel: KScopedSchedulerLockAndSleep: Remove unused ctor. 2020-12-06 00:03:24 -08:00
bunnei
b9b7e4f915 kernel: time_manager: Add missing lock guards. 2020-12-06 00:03:24 -08:00
bunnei
ccce6cb3be hle: kernel: Migrate to KScopedSchedulerLock. 2020-12-06 00:03:24 -08:00
bunnei
4756cb203e hle: kernel: Separate KScopedSchedulerLockAndSleep from k_scheduler. 2020-12-06 00:03:24 -08:00
bunnei
8d3e06349e hle: kernel: Separate KScheduler from GlobalSchedulerContext class. 2020-12-06 00:03:24 -08:00
bunnei
9e29e36a78 hle: kernel: Rewrite scheduler implementation based on Mesopshere. 2020-12-06 00:03:24 -08:00
bunnei
c10a37e5b6 hle: kernel: physical_core: Clear exclusive state after each run.
- This is closer to pre-multicore behavior, and works a bit better.
2020-12-06 00:03:24 -08:00
bunnei
7e5d0f1fe3 hle: kernel: Port KAbstractSchedulerLock from Mesosphere. 2020-12-06 00:03:24 -08:00
bunnei
39d356782e hle: kernel: svc: Remove reschedule on svcBreak.
- This breaks things, and is unnecessary, since emulation will be done at this point.
2020-12-06 00:03:24 -08:00
bunnei
d58a609ae4 hle: kernel: process: Add schedule count tracking, to be used for yield impl. 2020-12-06 00:03:24 -08:00
bunnei
493263f415 hle: kernel: svc: Remove unnecessary hack in svcSleep. 2020-12-06 00:03:24 -08:00
bunnei
a3ccac3eb7 common: Port KPriorityQueue from Mesosphere. 2020-12-06 00:03:24 -08:00
bunnei
e18ee8d681 hle: kernel: Port KAffinityMask from Mesosphere. 2020-12-06 00:03:24 -08:00
Lioncash
f95602f152 video_core: Resolve more variable shadowing scenarios pt.3
Cleans out the rest of the occurrences of variable shadowing and makes
any further occurrences of shadowing compiler errors.
2020-12-05 16:02:23 -05:00
Morph
f6d4a289d5 applets: Resolve variable shadowing 2020-12-05 08:37:13 -05:00
Chloe Marcec
7fbeb489d3 system_version: Update to 11.0.0 2020-12-05 16:08:03 +11:00
Morph
c2f83c04cb nim: Stub IsLargeResourceAvailable
- Used by Immortals Fenyx Rising
2020-12-04 09:53:21 -05:00
bunnei
69aaad9b96
Merge pull request #4996 from bunnei/use-4jits
Kernel: Refactor to use 4-instances of Dynarmic & various cleanups and improvements
2020-12-03 15:32:45 -08:00
bunnei
88089c8754
Merge pull request #5000 from lioncash/audio-error
audio_core: Make shadowing and unused parameters errors
2020-12-02 23:08:43 -08:00
Lioncash
1ea6bdef05 audio_core: Make shadowing and unused parameters errors
Moves the audio code closer to enabling warnings as errors in general.
2020-12-03 00:54:31 -05:00
bunnei
25f650e075
Merge pull request #4937 from german77/multiUDP
InputCommon: Add multiple udp server support
2020-12-01 11:47:37 -08:00
bunnei
7bc3e80399
Merge pull request #4939 from german77/MouseInput
InputCommon: Implement full mouse support
2020-11-29 22:59:50 -08:00
bunnei
4b9e1b6586 kernel: scheduler: Minor cleanup to remove duplicated code. 2020-11-29 01:31:52 -08:00
bunnei
b7ef581c6e kernel: time_manager: Protect access with a mutex. 2020-11-29 01:31:52 -08:00
bunnei
c2ad1243ba hle: kernel: thread: Remove unused "Running" state. 2020-11-29 01:31:52 -08:00
bunnei
63fd1bb503 core: arm: Implement InvalidateCacheRange for CPU cache invalidation. 2020-11-29 01:31:52 -08:00
bunnei
c0870315fd hle: kernel: time_manager: Avoid a crash on process exit. 2020-11-29 01:31:51 -08:00
bunnei
9705f651b2 hle: kernel: AddressArbiter: Remove unused code. 2020-11-29 01:31:51 -08:00
bunnei
9423347c1b hle: kernel: SynchronizationObject: Use atomic_bool for is_signaled. 2020-11-29 01:31:51 -08:00
bunnei
c042a89113 common: fiber: Use boost::context instead of native fibers on Windows. 2020-11-29 01:31:51 -08:00
bunnei
7b642c7781 hle: kernel: multicore: Replace n-JITs impl. with 4 JITs. 2020-11-29 01:31:51 -08:00
bunnei
6750b4d3af
Merge pull request #4998 from Morph1984/bioshock-patch
hid: Check if applet_resource exists in InitializeVibrationDevice
2020-11-28 23:20:23 -08:00
german
4eb7327559 Add missing types to NpadCommunicationMode 2020-11-28 21:56:02 -06:00
bunnei
312a8bd4b4
Merge pull request #5021 from german77/StubCommunicationMode
HID: Stub set and get NpadCommunicationMode
2020-11-28 15:22:46 -08:00
bunnei
1fde40b2c7
Merge pull request #5011 from lioncash/file-str2
core: Reduce string copies in GetGameFileFromPath()
2020-11-27 17:23:00 -08:00
Lioncash
5bc4eabe36 core: Eliminate remaining usages of the global system instance
Removes all remaining usages of the global system instance. After this,
migration can begin to migrate to being constructed and managed entirely
by the various frontends.
2020-11-27 11:40:45 -05:00
Lioncash
073e07ae2d savedata_factory: Eliminate usage of the global system instance
Now there's only two meaningful instances left in core.
2020-11-27 09:45:08 -05:00
german
3898d8f0d7 Stub set and get NpadCommunicationMode 2020-11-26 21:35:11 -06:00