Commit graph

7440 commits

Author SHA1 Message Date
bunnei
f923f9b6d0 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
851af116b2 Merge pull request #5135 from Morph1984/applets-shadow
applets: Resolve variable shadowing
2020-12-08 17:43:59 -08:00
Lioncash
a4f07e1cc4 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
c0ac666e2f Merge pull request #5167 from lioncash/doc-memory
memory: Resolve -Wdocumentation warning for Write()
2020-12-08 11:47:04 -08:00
Morph
bd11a640d0 IPurchaseEventManager: Implement GetPurchasedEventReadableHandle
- Used by Pokémon Café Mix
- Used by DOOM: Eternal
2020-12-08 13:39:19 -05:00
Morph
e6f78dd3f0 IPurchaseEventManager: Stub Set(Default)DeliveryTarget
- Used by Pokémon Café Mix
- Used by DOOM: Eternal
2020-12-08 13:39:13 -05:00
Morph
6327da2213 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
024c10b697 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
419996f5db fsp_srv: Implement OpenDataStorageWithProgramIndex
- Used by RollerCoaster Tycoon 3: Complete Edition
2020-12-08 08:19:05 -05:00
Morph
f30f97994b file_sys: Consolidate common Title ID operations 2020-12-08 08:19:05 -05:00
Morph
8aa4a6d501 Merge pull request #5165 from lioncash/copy-controller
controller: Avoid unnecessary copies in ConfigurationComplete()
2020-12-08 20:48:45 +08:00
Lioncash
8f135703dc 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
fb0e41b085 controller: Use std::move within ConvertToFrontendParameters()
Avoids unnecessary copies.
2020-12-07 22:04:16 -05:00
Lioncash
b3a31de3b9 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
439488a842 Merge pull request #5020 from german77/AnalogfromButtonFix
Disable analog joystick from buttons by default
2020-12-08 10:30:21 +08:00
german
1a3e4518ec Disable analog joystick from buttons by default 2020-12-07 19:34:52 -06:00
bunnei
1613bbab8a 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
9ba99af200 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
6324f1e67f 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
7694cb9154 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
5afcc5fb3d Merge pull request #5150 from comex/xx-boxcat
boxcat: Avoid unnecessary object copy
2020-12-07 00:07:39 -05:00
LC
60ba2d11df 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
f5937952aa 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
086238f1ac 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
63994da5c3 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
3c7962df41 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
cf99d67e66 core: Mark unused fields as [[maybe_unused]] 2020-12-06 18:36:10 -05:00
comex
8e924224df boxcat: Avoid unnecessary object copy 2020-12-06 18:31:13 -05:00
comex
e250594b6e 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
144e143a40 hle: kernel: Process: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
cf7a66a3cc 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
37b1919b4d hle: kernel: Thread: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
f83f0ef61b hle: kernel: KScopedSchedulerLockAndSleep: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
85c01ee860 hle: kernel: KScopedLock: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
e3e254b713 hle: kernel: KAbstractSchedulerLock: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
2033f0a1a3 hle: kernel: KScheduler: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
dfacfa12d3 hle: kernel: KPriorityQueue: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
266d16c350 hle: kernel: KAffinityMask: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
ddaecce2f5 hle: kernel: GlobalSchedulerContext: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
ea30e22ef1 hle: kernel: Use C++ style comments in KScheduler, etc. 2020-12-06 00:03:24 -08:00
bunnei
c3c09d9a35 kernel: KScopedSchedulerLockAndSleep: Remove unused ctor. 2020-12-06 00:03:24 -08:00
bunnei
31243d2b7a kernel: time_manager: Add missing lock guards. 2020-12-06 00:03:24 -08:00
bunnei
de522657dd hle: kernel: Migrate to KScopedSchedulerLock. 2020-12-06 00:03:24 -08:00
bunnei
61e017a026 hle: kernel: Separate KScopedSchedulerLockAndSleep from k_scheduler. 2020-12-06 00:03:24 -08:00
bunnei
4f16c961c9 hle: kernel: Separate KScheduler from GlobalSchedulerContext class. 2020-12-06 00:03:24 -08:00
bunnei
039844bbb9 hle: kernel: Rewrite scheduler implementation based on Mesopshere. 2020-12-06 00:03:24 -08:00
bunnei
abc079aca1 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
1ffab4019b hle: kernel: Port KAbstractSchedulerLock from Mesosphere. 2020-12-06 00:03:24 -08:00
bunnei
0c9f4d749c 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
cd66ac3af5 hle: kernel: process: Add schedule count tracking, to be used for yield impl. 2020-12-06 00:03:24 -08:00