Commit Graph

30790 Commits

Author SHA1 Message Date
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
Admiral H. Curtiss 17da22a84f GCMemcard: GCMBlock: Move code out of header. 2019-05-18 15:44:38 +02:00
Admiral H. Curtiss e4094d9d2d GCMemcard: BlockAlloc: Move code out of header, fix naming conventions. 2019-05-18 15:44:38 +02:00
Admiral H. Curtiss 4b46f71b3c GCMemcard: Header: Move code out of header, fix naming conventions. 2019-05-18 15:44:38 +02:00
Admiral H. Curtiss 0052b313d6 GCMemcard: Directory: Move code out of header, add some boundary checks, fix naming conventions. 2019-05-18 15:44:38 +02:00
Léo Lam d3c4d278e2
Merge pull request #8077 from leoetlino/debugger-valign
Qt/Debugger: Fix register cell text vertical alignment
2019-05-17 20:17:52 +02:00
spycrab dce056b7f9
Merge pull request #8101 from spycrab/cmake_qol
[Windows] CMake Quality of Life improvements
2019-05-16 20:55:10 +02:00
spycrab bab00088d4 CMake/Windows: Add PCH support 2019-05-15 19:28:04 +02:00
spycrab 481b7cd085 DolphinQt/CMake: Fix Gettext not getting run on Windows 2019-05-15 19:19:16 +02:00
spycrab bdd37c4dbc DolphinQt/CMake: Copy files as a post build step 2019-05-15 19:19:15 +02:00
spycrab d15f5936b3 CMake: Output Windows binaries into Binary 2019-05-15 19:17:03 +02:00
spycrab da046f06da CMakeSettings.json: Separate build directories 2019-05-15 19:17:02 +02:00
spycrab 0b57a8b01d CMakeSettings.json: Use Ninja 2019-05-15 09:53:42 +02:00