Commit Graph

10234 Commits

Author SHA1 Message Date
15abb1c92d GCMemcardDirectory: Improve logic for which files are loaded into the virtual memory card.
- Files for the current game are now guaranteed to be loaded, space and validity permitting.
- Avoid showing PanicAlerts for every problem encountered, most of them aren't really important enough and will probably just annoy the user.
- And for the only error the user will definitely care about, when the save of the game they're trying to play fails to load, show an imgui message instead.
2019-05-25 21:51:36 +02:00
5af05f6714 GCMemcard/GCIFile: Implement LoadHeader(). 2019-05-25 21:49:09 +02:00
884af05589 GCMemcardDirectory: Move GCIFile class to its own file. 2019-05-25 21:49:09 +02:00
edf988b465 Merge pull request #8019 from AdmiralCurtiss/gcmemcard-header-cleanup
GCMemcard: A little cleanup.
2019-05-25 19:20:43 +02:00
e390fd0f4e GCMemcard: Remove unused ability of ImportGci() to write a GCI file to disk. 2019-05-25 17:58:05 +02:00
018572018e GCMemcard: Dismantle the global return value enum into a few function specific enum classes. 2019-05-25 17:58:05 +02:00
d09303683c GCMemcard: Convert a few enums into constexprs. 2019-05-25 17:58:05 +02:00
cbc5acb8cd GCMemcard: Get rid of stray signed length in ImportGciInternal(). 2019-05-25 17:58:05 +02:00
2d38364410 GCMemcard: Remove memsets that don't do anything in GCMemcard::Format(). 2019-05-25 17:58:05 +02:00
88a0773309 GCMemcard: Rewrite checksum calculation without undefined behavior. 2019-05-25 17:58:05 +02:00
fcd75841ca GCMemcard: Rewrite Header::CalculateSerial() without undefined behavior. 2019-05-25 17:58:05 +02:00
5fb56505b2 Merge pull request #8109 from leoetlino/ios-usb-fixes
IOS: USB fixes
2019-05-24 22:03:46 +02:00
6dd0fe21f2 IOS/USB: Claim all interfaces ahead-of-time
To avoid having to claim/release interfaces all the time, and having to
trigger interface changes from several places, all interfaces are now
claimed ahead of time.

This commit also makes us avoid changing the active interface when it's
not necessary.

Changing the active interface has side effects such as resetting the
active alternate setting -- which is extremely undesirable because it
would require the emulated software to change the alternate setting
again, which isn't supposed to be necessary at all.

This fixes Your Shape, which submits isochronous transfers on an
endpoint that only exists in alt setting 6 right after submitting
control transfers (which would have reset to alt setting 0 prior to
this fix).
2019-05-24 20:47:46 +02:00
e07b514b62 Merge pull request #8115 from booto/powerpc_pvr
PowerPC: Add Broadway's PVR (retail Wii)
2019-05-24 14:51:06 +02:00
6eb7c525b2 Merge pull request #7801 from GerbilSoft/feature/Discord-PPCTitleChanged
Update Discord rich presence when the PPC title changes
2019-05-24 14:30:52 +02:00
8417c78b7a Update Discord rich presence when the title changes
This allows us to update the rich presence description if a channel
is launched from the Wii Menu. It also handles other PPC title
launches, e.g. Smash Bros. Masterpieces.

Host.h: Added Host_TitleChanged().

DolphinNoGUI/MainNoGUI.cpp: Implemented Host_TitleChanged().
DolphinQt/Host.cpp: Implemented Host_TitleChanged().

Android/jni/MainAndroid.cpp: Stubbed Host_TitleChanged().
DSPTool/StubHost.cpp: Stubbed Host_TitleChanged().
UnitTests/StubHost.cpp: Stubbed Host_TitleChanged().
2019-05-24 14:12:48 +02:00
27cb407ecf PowerPC: Add Broadway's PVR (retail Wii) 2019-05-23 19:56:41 -04:00
68877c52d1 Merge pull request #8027 from MerryMage/MOVAPS
Jit64: Prefer MOVAPS where possible
2019-05-22 15:05:17 +10:00
2b44e1b851 IOS/USB: Fix initial device scan
Even though libusb is supposed to be thread-safe, in practice
it's not (at least on Windows); getting a list of devices from two
different threads can result in libusb crashes. This is easily
fixed by waiting for the scan thread to complete scanning instead
of running the scan on the CPU thread.

This also fixes an issue that I had overlooked in the initial
implementation: IOS interfaces such as OH0 are sometimes opened
every frame, in which case we were doing a full device scan every
single frame on the CPU thread!
2019-05-21 19:07:30 +02:00
b274a054a9 IOS/VEN: Read cancel endpoint correctly
Fixes an embarrassing bug that made the implementation utterly useless.

This fixes Your Shape hanging on shutdown. The game was waiting for an
interrupt transfer to be cancelled, and Dolphin wasn't cancelling
transfers on the correct endpoint.
2019-05-21 19:07:30 +02:00
d7e23d71f8 IOS/VEN: Return -4 when no transfer was cancelled
Simple accuracy fix.
2019-05-21 19:07:30 +02:00
4c6ef81291 IOS/USB: Verify that isochronous req buffer size is consistent
To catch possible bugs.
2019-05-21 19:07:30 +02:00
a6da38d75d IOS/USB: Fix TransferCommand length type
The total buffer size for isochronous transfers should be a u32,
not a u16. It is easy to hit the bug with devices such as cameras,
which require larger buffers.

This fixes Your Shape.

This also fixes the length type for bulk and interrupt transfers,
which should be u32 as that's what IOS supports. I'm not sure why
I made them u16... probably because OH0 uses u16 for most lengths...
2019-05-21 19:07:30 +02:00
5226d6103a IOS/USB: Add debug logging for all transfers
This makes debugging USB issues easier.
2019-05-21 19:07:29 +02:00
1d22e50899 Core/Boot/Boot: Amend use-after-move cases in GenerateFromFile()
In terms of order of operations, the move would occur first before the
construction of the relevant reader would occur. However, given the
local variable 'path' was declared const, this bug actually wouldn't
occur, as std::move on a const variable does nothing (in a non-mutable
context), resulting in a copy instead, masking this issue.

Given this is a bug waiting to happen, we correct the code.
2019-05-21 08:44:29 -04:00
6e04e4dd6a GCMemcard: DEntry: Move code out of header. 2019-05-18 15:44:38 +02:00
17da22a84f GCMemcard: GCMBlock: Move code out of header. 2019-05-18 15:44:38 +02:00
e4094d9d2d GCMemcard: BlockAlloc: Move code out of header, fix naming conventions. 2019-05-18 15:44:38 +02:00
4b46f71b3c GCMemcard: Header: Move code out of header, fix naming conventions. 2019-05-18 15:44:38 +02:00
0052b313d6 GCMemcard: Directory: Move code out of header, add some boundary checks, fix naming conventions. 2019-05-18 15:44:38 +02:00
ec734065db Merge pull request #8087 from spycrab/cmake_win2019
Support CMake on Windows
2019-05-14 21:07:26 +02:00
b35c58451a Clear existing GCPad state 2019-05-14 03:33:29 -04:00
c8795f799e Core/CMake: Silence some warnings 2019-05-12 00:44:02 +02:00
7c46497f04 Fix a race condition when shutting down audio stream
The main EmuThread (in Core) is responsible for both initialising the
audio stream and shutting it down properly.

When the core is shutting down (when state is State::PowerDown), it is
possible that the CPU or CPU-GPU thread and the UI thread will both
try to stop the audio stream at the same time, which is an issue
because some audio backends such as cubeb are not thread-safe.

This commit prevents the race from ever happening in the first place
by removing the call to AudioCommon::SetSoundStreamRunning from
CPU::RunAdjacentSystems, which is actually completely unnecessary when
shutting down because Core::EmuThread is going to stop the stream and
perform more cleanup anyway.

Should fix https://bugs.dolphin-emu.org/issues/11722
2019-05-11 16:36:42 +02:00
2f89a50318 Merge pull request #7778 from jordan-woyak/wheel-accel-brake
SI/GCSteeringWheel: Allow simultaneous use of accelerator and brake.
2019-05-11 12:24:19 +02:00
3ab06dcd02 Merge pull request #8016 from jordan-woyak/emu-wm-ir-rename
WiimoteEmu/DolphinQt: Rename "IR" to "Point" and eliminate redundant Forward/Backward actions.
2019-05-10 19:16:40 -07:00
d00711b34f AddressSpace: Fix PowerPC::HostWrite_XXX parameter order mixup 2019-05-11 00:15:15 +02:00
f74f49383c SI/GCSteeringWheel: Allow simultaneous use of accelerator and brake. 2019-05-10 17:11:43 -05:00
e7bc86881d Merge pull request #8056 from JosJuice/more-enums-to-constexpr
Turn more enum constants into constexpr
2019-05-10 18:52:52 +02:00
8e2277e1f2 Turn more enum constants into constexpr
https://bugs.dolphin-emu.org/issues/11692#note-7
2019-05-10 15:04:16 +02:00
123bbbca2c Merge pull request #8073 from vladfi1/re-frame-mw
Bring back MemoryWatcher, but without CoreTiming
2019-05-10 14:55:27 +02:00
e98f43d2af bbox minor fx 2019-05-09 17:30:17 +08:00
374585f128 WiimoteEmu/DolphinQt: Rename "IR" to "Point" and eliminate redundant Forward/Backward mappings. 2019-05-08 20:27:41 -05:00
967252dded IOS/FS/Filesystem: Work around macro problem 2019-05-08 21:06:17 +02:00
239af3cdf9 Step MemoryWatcher at end of each video frame. 2019-05-08 11:20:59 +01:00
0de6b5f7fa WiimoteEmu: Implement "Drawsome" tablet. 2019-05-07 18:07:24 -05:00
91f5d577cc Merge pull request #8084 from leoetlino/wiisave-sign
WiiSave: Fix save signing
2019-05-07 14:43:50 +02:00
2740ff9a9d WiiSave: Fix save signing
The system menu is passing the SHA1 hash of the save data to ES
to sign, not the save data itself.

Fixes save import in the System Menu for saves that were exported
by Dolphin.
2019-05-07 01:09:48 +02:00
f055d37346 WiimoteEmu: Add game quirk report for reading of EXT/IR input directly, which will fail with TAS/NetPlay. 2019-05-06 15:36:05 -05:00
ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00