Commit graph

30702 commits

Author SHA1 Message Date
Léo Lam
526698d2fc
Merge pull request #8104 from AdmiralCurtiss/memcard-folder-small
GCMemcardDirectory: Improve logic for initial load of GCI files.
2019-05-26 11:07:43 +02:00
Admiral H. Curtiss
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
Admiral H. Curtiss
5af05f6714 GCMemcard/GCIFile: Implement LoadHeader(). 2019-05-25 21:49:09 +02:00
Admiral H. Curtiss
884af05589 GCMemcardDirectory: Move GCIFile class to its own file. 2019-05-25 21:49:09 +02:00
Léo Lam
9136abf07e
Merge pull request #8106 from 8times9/memcard-menubar
Qt/MenuBar: Reorder Tools menu
2019-05-25 21:19:38 +02:00
8times9
00855552e9 Qt/MenuBar: Reorder Tools menu 2019-05-25 20:22:52 +02:00
Léo Lam
edf988b465
Merge pull request #8019 from AdmiralCurtiss/gcmemcard-header-cleanup
GCMemcard: A little cleanup.
2019-05-25 19:20:43 +02:00
Admiral H. Curtiss
e390fd0f4e GCMemcard: Remove unused ability of ImportGci() to write a GCI file to disk. 2019-05-25 17:58:05 +02:00
Admiral H. Curtiss
018572018e GCMemcard: Dismantle the global return value enum into a few function specific enum classes. 2019-05-25 17:58:05 +02:00
Admiral H. Curtiss
d09303683c GCMemcard: Convert a few enums into constexprs. 2019-05-25 17:58:05 +02:00
Admiral H. Curtiss
cbc5acb8cd GCMemcard: Get rid of stray signed length in ImportGciInternal(). 2019-05-25 17:58:05 +02:00
Admiral H. Curtiss
2d38364410 GCMemcard: Remove memsets that don't do anything in GCMemcard::Format(). 2019-05-25 17:58:05 +02:00
Admiral H. Curtiss
88a0773309 GCMemcard: Rewrite checksum calculation without undefined behavior. 2019-05-25 17:58:05 +02:00
Admiral H. Curtiss
fcd75841ca GCMemcard: Rewrite Header::CalculateSerial() without undefined behavior. 2019-05-25 17:58:05 +02:00
Léo Lam
5fb56505b2
Merge pull request #8109 from leoetlino/ios-usb-fixes
IOS: USB fixes
2019-05-24 22:03:46 +02:00
Léo Lam
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
Léo Lam
e07b514b62
Merge pull request #8115 from booto/powerpc_pvr
PowerPC: Add Broadway's PVR (retail Wii)
2019-05-24 14:51:06 +02:00
Léo Lam
9373bc3aa9
Merge pull request #8102 from dreamsyntax/debug-mousefix
Qt/Debugger CodeWidget navigation unification
2019-05-24 14:49:05 +02:00
dreamsyntax
e06a62d9d1 Qt: Fix CodeWidget navigation
Changed itemSelectionChanged and itemClicked signal to itemPressed in CodeWidget.
Holding mouse down and moving will only travel up/down the stack one time.
This fixes the common occurrence of unintentionally traveling deeper down the stack or higher up the callstack than intended.
2019-05-24 14:39:15 +02:00
Léo Lam
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
David Korth
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
booto
27cb407ecf PowerPC: Add Broadway's PVR (retail Wii) 2019-05-23 19:56:41 -04:00
Léo Lam
702344ba9c
Merge pull request #8105 from 8times9/render-window
Qt/InterfacePane: Rename "In-Game" to "Render Window"
2019-05-23 13:06:36 +02:00
Léo Lam
617747e905
Merge pull request #8113 from lioncash/ini-key
Common/IniFile: Simplify Set()
2019-05-23 12:15:30 +02:00
Léo Lam
67c2aa0701
Merge pull request #8114 from lioncash/ini-line
IniFile: Prevent potential out-of-bounds access in ParseLine()
2019-05-23 12:12:41 +02:00
JosJuice
3132839113
Merge pull request #8116 from booto/clang-format-revert
clang-format: revert 'AfterCaseLabel' setting
2019-05-23 10:56:51 +02:00
booto
c5a9a77684 clang-format: revert 'AfterCaseLabel' setting 2019-05-23 00:42:42 -04:00
Lioncash
2ae370fc37 IniFile: Prevent potential out-of-bounds access in ParseLine()
While current usages of ParseLine aren't problematic, this is still a
public function that can be used for other purposes. Essentially makes
the function handle potential external inputs a little nicer.
2019-05-22 21:09:11 -04:00
Lioncash
869acb96c6 Common/IniFile: Simplify Set()
We can just utilize map's insert_or_assign() function and check the
return value to determine whether or not we need to insert the key into
the keys_order vector.
2019-05-22 20:58:49 -04:00
Connor McLaughlin
2bedb8a592
Merge pull request #8112 from Techjar/clang-format-case-labels
Add BraceWrapping/AfterCaseLabel to .clang-format
2019-05-22 16:08:48 +10:00
Techjar
2e602344ea Add BraceWrapping/AfterCaseLabel to .clang-format 2019-05-22 01:51:11 -04:00
Connor McLaughlin
68877c52d1
Merge pull request #8027 from MerryMage/MOVAPS
Jit64: Prefer MOVAPS where possible
2019-05-22 15:05:17 +10:00
Léo Lam
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
Léo Lam
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
Léo Lam
d7e23d71f8 IOS/VEN: Return -4 when no transfer was cancelled
Simple accuracy fix.
2019-05-21 19:07:30 +02:00
Léo Lam
4c6ef81291 IOS/USB: Verify that isochronous req buffer size is consistent
To catch possible bugs.
2019-05-21 19:07:30 +02:00
Léo Lam
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
Léo Lam
5226d6103a IOS/USB: Add debug logging for all transfers
This makes debugging USB issues easier.
2019-05-21 19:07:29 +02:00
Léo Lam
57fbf1cd6e
Merge pull request #8107 from lioncash/string
DolphinQt/AboutDialog: Remove unnecessary QStringLiteral
2019-05-21 18:44:37 +02:00
Léo Lam
99ba260b51
Merge pull request #8108 from lioncash/use-after-move
Core/Boot/Boot: Amend use-after-move cases in GenerateFromFile()
2019-05-21 18:39:15 +02:00
Lioncash
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
Lioncash
ae329b7b1b DolphinQt/AboutDialog: Remove unnecessary QStringLiteral
QStrings automatically initialize to an empty string by default, making
this unnecessary.
2019-05-21 07:13:14 -04:00
Léo Lam
e2c769a9c5
Merge pull request #7992 from artemist/centering
ControllerEmu: Add support for setting the center of a ReshapableInput
2019-05-20 18:29:31 +02:00
Léo Lam
d2c7a6f239
Merge pull request #8094 from leoetlino/log-type-names
Qt/LogConfigWidget: Show log type short names
2019-05-20 18:27:57 +02:00
Artemis Tosini
4bbbd02de7
ControllerEmu: Do not change center when closing window 2019-05-19 16:55:29 +00:00
8times9
ba3b59fd18 Qt/InterfacePane: Rename In-Game to Render Window 2019-05-18 16:01:38 -05:00
Artemis Tosini
e5683988c0
ControllerEmu: Zero the center of a ReshapableInput when calibrating 2019-05-18 19:32:48 +00:00
Artemis Tosini
99cf9a57fc
Draw center when calibrating and remove constant
This adds the center to the calibration menu when it is nonzero.
It also refactors CENTER_COLOR to be a function, similar to other colors
after an earlier commit.
2019-05-18 18:36:28 +00:00
Artemis Tosini
49e46c8aff
ControllerEmu: Add support for setting the center of a ReshapableInput
This is useful in far out-of-calibration controllers, such as the
Switch Pro controller. This also adds support for configuring the center
in the Mapping widget.
2019-05-18 14:45:16 +00:00
Admiral H. Curtiss
6e04e4dd6a GCMemcard: DEntry: Move code out of header. 2019-05-18 15:44:38 +02:00