Commit graph

23330 commits

Author SHA1 Message Date
Léo Lam
60aea524b1
Merge pull request #8232 from JosJuice/wasapi-translatable
Mark "WASAPI (Exclusive Mode)" as translatable
2019-07-22 21:38:39 +08:00
Léo Lam
71b2e1a997
Merge pull request #8225 from JosJuice/sd-hotkey
Add a hotkey for inserting/ejecting the SD card
2019-07-22 21:38:00 +08:00
JosJuice
73a9b4148b
Merge pull request #8257 from CookiePLMonster/assert-fixes
Fixes to assertions
2019-07-22 08:47:13 +02:00
Silent
518d96ad48
Remove duplicated "Ignore and countinue?" 2019-07-21 15:36:24 +02:00
JosJuice
4b73d18eaa Re-implement FixCommonKeyIndex for WAD files
The old implementation of this was not able to distinguish between
a title that had the common key index set to 1 because it actually
was Korean and a title that had the common key index set to 1 due to
fakesigning. This new implementation solves the problem by
decrypting a content with each possible common key and checking
which result matches the provided SHA-1 hash.

The problem that the old implementation causes has only been reported
to affect a certain pirated WAD of Chronos Twins DX (WC6EUP), but it's
possible that the problem would start affecting more WADs if we add
support for the vWii common key (which uses index 2). Adding support
for the vWii common key would also prevent us from using the simpler
solution of always forcing the index to 0 if the title is not Korean.
2019-07-21 09:58:16 +02:00
JosJuice
2fda104d5a Never set disc as active title when launching channel with same ID
https://bugs.dolphin-emu.org/issues/11804
2019-07-21 09:53:52 +02:00
JosJuice
4ee73dbad3 IOS: Put common key handles in an array 2019-07-21 09:37:06 +02:00
Léo Lam
da1fbbc5d5
Merge pull request #8243 from JosJuice/merge-wad-classes
DiscIO: Merge WiiWAD into VolumeWAD
2019-07-21 15:32:52 +08:00
Léo Lam
cd7a374ab9
Merge pull request #8246 from lioncash/fifo
Core/FifoAnalyzer: Tidy up interface
2019-07-21 15:17:43 +08:00
Léo Lam
1ed7cc260b
Merge pull request #8248 from lioncash/settings
Common/SettingsHandler: Use std::string_view where applicable
2019-07-21 15:13:27 +08:00
Stenzek
8b44a48383 Vulkan: Disable reversed viewport depth on macOS/MoltenVK
Apparently this is broken despite being allowed by the spec.
2019-07-21 13:27:35 +10:00
Silent
7045c68327
When clicking "Ignore for this session", make message box handler return true, so asserts can actually be skipped with this option 2019-07-20 21:04:27 +02:00
Silent
e792a67dc6
Improve thread safety and remove an unnecessary string allocation from MsgAlert
s_msg_handler still seems thread unsafe, not sure if it should be or not
2019-07-20 21:03:45 +02:00
Connor McLaughlin
fc8859a414
Merge pull request #8249 from lioncash/rect
VideoCommon: Remove unused MathUtil.h include from VideoCommon.h
2019-07-19 16:32:30 +10:00
Stenzek
97d81ac97c FramebufferShaderGen: Fix format reinterpret shaders on GLES 2019-07-19 15:33:32 +10:00
Stenzek
6f53a4d0da TextureCache: Don't crash when conversion pipelines fail to compile 2019-07-19 15:32:50 +10:00
JosJuice
34f32898e6 DiscIO: Merge WiiWAD into VolumeWAD
These two classes are very similar, so let's merge them.
2019-07-18 22:29:04 +02:00
JosJuice
0f5a4b37ee DiscIO: Add functions CreateDisc and CreateWAD
...in addition to the existing function CreateVolume
(renamed from CreateVolumeFromFilename).

Lets code easily add constraints such as not letting the user
select a WAD file when using the disc changing functionality.
2019-07-18 22:29:04 +02:00
Stenzek
f269c4c798 EFB2Tex: Set alpha channel of Z24X8 copies to 1
Matches EFB2RAM.
2019-07-18 23:51:07 +10:00
Stenzek
68bd4cd79a Vulkan: Use reversed depth range in viewport
Also adds a DriverDetails bug to disable on drivers where this is still
broken.
2019-07-18 23:43:12 +10:00
Connor McLaughlin
a77b571da7
Merge pull request #8250 from JosJuice/bitrate-setting
Add dumping bitrate setting to GUI and increase default value
2019-07-18 22:17:13 +10:00
JosJuice
199c565bf5 DolphinQt: Add the dumping bitrate setting to the graphics config
Fixes https://bugs.dolphin-emu.org/issues/10250
2019-07-18 12:20:21 +02:00
JosJuice
a6dcaed415 DolphinQt: Move frame dumping settings to new group box 2019-07-17 20:07:40 +02:00
JosJuice
f6a755e1ab Change the default dumping bitrate from 2.5 Mbps to 25 Mbps
2.5 Mbps looks noticeably bad even at native resolution.
2019-07-17 19:55:37 +02:00
Lioncash
2b9389202e VideoCommon: Remove unused MathUtil.h include from VideoCommon.h
This header doesn't actually make use of MathUtil.h within itself, so
this can be removed. Many other source files used VideoCommon.h as an
indirect include to include MathUtil.h, so these includes can also be
adjusted.

While we're at it, we can also migrate valid inclusions of VideoCommon.h
into cpp files where it can feasibly be done to minimize propagating it
via other headers.
2019-07-16 20:54:34 -04:00
Lioncash
13a454d603 Common/SettingsHandler: Use fmt for printing out the serial number
Same thing, less code.
2019-07-16 04:23:20 -04:00
Lioncash
af576839d8 Common/SettingsHandler: Use std::string_view where applicable
Allows passed in strings to be non-allocating.
2019-07-16 04:15:25 -04:00
Connor McLaughlin
9dd8f82e78
Merge pull request #8247 from lioncash/core-include
Core/HW/AddressSpace: Remove unnecessary inclusion of Core.h
2019-07-16 14:32:18 +10:00
Lioncash
2b00eefbef DolphinQt/Debugger: Replace AddressSpace.h inclusions with a forward declaration 2019-07-15 23:20:26 -04:00
Lioncash
df0d4b6aea Core/HW/AddressSpace: Remove unnecessary inclusion of Core.h
This is only included to satisfy the use of our type aliases. Given
that, we can just include CommonTypes.h, lessening dependencies on core
headers.
2019-07-15 23:13:55 -04:00
Lioncash
ac6d70b82b Core/FifoAnalyzer: Use std::array where applicable
This lets us convert CalculateVertexElementSizes() from a function using
an out pointer into one that simply returns the array data as a return
value.

It also lets us dehardcode some values, as we can just query
std::array's size() member function instead.
2019-07-15 07:37:35 -04:00
Lioncash
73db402010 Core/FifoAnalyzer: Convert DecodeMode enum into an enum class
Makes the enumeration elements strongly typed.
2019-07-15 07:37:30 -04:00
JosJuice
1606528093
Merge pull request #8234 from JosJuice/version-in-title
Show Dolphin version in render window title
2019-07-15 13:05:08 +02:00
JosJuice
0b11f15158 Fix VolumeVerifier considering Wii Menu WADs to have wrong region 2019-07-15 12:42:13 +02:00
Lioncash
53779aa732 Core/FifoAnalyzer: Make functions internally linked where applicable
These functions are only used internally within FifoAnalyzer.cpp, so
they can be hidden from external use.
2019-07-14 20:37:21 -04:00
Stenzek
946571b759 TextureCache: Support reinterpreting formats for VRAM textures 2019-07-14 19:16:27 +10:00
Stenzek
77f406c8a8 TextureCache: Combine ApplyPaletteToEntry and ConvertTexture 2019-07-14 14:07:37 +10:00
Stenzek
dfae87d69a TextureConversionShader: Swap bytes for RG8/GB8 format
Matches the software renderer.
2019-07-14 13:36:43 +10:00
Léo Lam
2f5e6cfff1
Merge pull request #8218 from leoetlino/context
Use separate libusb contexts to avoid thread safety issues
2019-07-11 17:28:19 +02:00
Connor McLaughlin
4c649d1a5d
Merge pull request #8238 from lioncash/video-stats
VideoCommon/Statistics: Minor cleanup changes
2019-07-11 20:34:48 +10:00
Lioncash
9c245655fb VideoCommon/Statistics: Remove unused DECSTAT macro
This isn't used anywhere, so it can be removed. This also potentially
fixes an underlying compilation error waiting to happen, given DECSTAT
could have potentially been used, someone disables statistics (for
whatever reason), then gets a compilation error due to the #else case
not containing an empty definition of DECSTAT.
2019-07-10 23:40:13 -04:00
Lioncash
d4337eebde VideoCommon/Statistics: Rename stats global to g_stats
Makes the global variable follow our convention of prefixing g_ on
global variables to make it obvious in surrounding code that it's not a
local variable.
2019-07-10 23:34:54 -04:00
Lioncash
9802a5e16b VideoCommon/Statistics: Make all member functions non-static
Rather than making Statistics' member functions operate on the global
variable instance of itself, we can make these functions member
functions and operate on a by-instance state, removing the direct
dependency on the global variable itself.

This also makes for less reading, as there's no need to repeat "stats."
for all variable accesses.
2019-07-10 23:24:37 -04:00
Lioncash
a99c7d01e1 VideoCommon/Statistics: Normalize statistic variable names
Normalizes all variables related to statistics so that they follow our
coding style.

These are relatively low traffic areas, so this modification isn't too
noisy.
2019-07-10 23:19:10 -04:00
JosJuice
44fe5812b9 Fix FIFO player crashing when USE_MEMORYWATCHER is defined 2019-07-10 20:43:15 +02:00
Lioncash
d2d7bf5c3b Common/DebugInterface: Remove GetInstructionSize()
This is completely unused, so it can be removed.
2019-07-09 14:19:40 -04:00
Lioncash
92c1782726 Common/DebugInterface: Mark a few member functions as const
Quite a few member functions act as a means to query information. Given
these don't actually modify object state, they can be made const.
2019-07-09 14:19:40 -04:00
Lioncash
d4d485b692 Common/DebugInterface: Make return value of GetColor() a u32
At its only usage point, its return value is stored into a u32, and the
default implementation returns 0xFFFFFFFF (-1), which would be an
unsigned integer. Given all of the bits are used to determine a color,
it makes slightly more sense to treat this as an unsigned value as
opposed to a signed one.
2019-07-09 14:19:38 -04:00
Lioncash
a9a9b193bb Common/DebugInterface: Use forward declarations where applicable
We're allowed (by the standard) to forward declare types within
std::vector, so we can replace direct includes with forward declarations
and then include the types where they're directly needed.

While we're at it, we can remove an unused inclusion of <cstring>, given
nothing in the header uses anything from it. This also revealed an
indirect inclusion, which this also resolves.
2019-07-08 18:59:11 -04:00
Lioncash
98101bbbe4 Core: Use fmt where applicable for DebugInterface implementations
These are trivial enough that they're basically one-to-one conversions
with minor changes of syntax.
2019-07-08 18:52:59 -04:00
Lioncash
457bff92c1 Common/DebugInterface: Use u32 instead of unsigned int consistently
Previously u32 was being used for part of the interface and unsigned int
was being used for other parts. This makes the interface fully consistent by
using only one type.

We opt for u32 here given they communicate the same thing (for platforms
we care about where int is 32-bit), while also being less to read.
2019-07-08 18:52:45 -04:00
Lioncash
b1b9c6aa1e Common/DebugInterface: Default virtual destructor
While we're at it, we can also default the constructor and destructor of
inheriting classes in their respective cpp file to prevent the
construction and destruction of non-trivial types being inlined into
other regions of code.
2019-07-08 17:44:58 -04:00
Lioncash
bc8778203e Common/Watches: std::move strings where applicable
Allows calling code to move the std::string into the Watch instances,
avoiding copies.
2019-07-08 17:41:06 -04:00
JosJuice
f3579e788d Show Dolphin version in render window title
This was in DolphinWX but not DolphinQt. It's useful for telling if
users who post screenshots have an up-to-date version of Dolphin.

The old implementation of this prepended the version in DolphinWX code
rather than Core code, but I thought it'd be simpler to do it in Core.
2019-07-08 15:03:00 +02:00
JosJuice
445759aed1 Mark "WASAPI (Exclusive Mode)" as translatable
While "WASAPI" doesn't need to be translated, "Exclusive Mode" does.
2019-07-07 18:22:22 +02:00
JMC47
398aa2a9f9
Merge pull request #8231 from JosJuice/debugger-hidden
DolphinQt: Don't update debug widgets when hidden
2019-07-07 07:35:06 -04:00
Tillmann Karras
da87638ea2 Fix GDB stub 2019-07-07 05:17:33 +01:00
JosJuice
92a655c8b9 DolphinQt: Don't update debug widgets when hidden
Saves on CPU usage when pausing/unpausing with the debugger disabled.
This is especially important when using frame advance rapidly.
2019-07-06 11:30:17 +02:00
spycrab
64de900da4 Qt/ControllersWindow: Fix radio buttons not getting disabled
Only happens if the controller window hasn't been opened before.
2019-07-05 16:50:37 +02:00
Lioncash
ce30efc6cf Common/GekkoDisassembler: Don't print out '\0' as a character
Prevents a few instructions from having mangled names in some cases.
2019-07-03 20:12:50 -04:00
JosJuice
e24789b4fb Add a hotkey for inserting/ejecting the SD card 2019-07-03 22:44:51 +02:00
Connor McLaughlin
0a7395bfba
Merge pull request #8128 from altimumdelta/FrameDumpUpgradePrep1
Code: Rename AVIDump to FrameDump
2019-06-30 21:13:19 +10:00
altimumdelta
1df655e376 VideoCommon: Rename AVIDump to FrameDump 2019-06-30 13:02:39 +02:00
Connor McLaughlin
0d2c3e6efc
Merge pull request #8219 from Pokechu22/float-watch
Show values as floats in watch
2019-06-30 11:34:29 +10:00
Pokechu22
ae0843f53d Show values as floats in watch 2019-06-29 12:04:20 -07:00
Connor McLaughlin
e388f01e11
Merge pull request #8215 from CookiePLMonster/appverifier-sanitize
Fixed various errors spotted with Application Verifier
2019-06-30 01:27:25 +10:00
Connor McLaughlin
f151570b2d
Merge pull request #8118 from 8times9/move-windowontop
Qt/InterfacePane: Move "Keep Window on Top" to Render Window section
2019-06-30 00:46:12 +10:00
Connor McLaughlin
341ce45ed6
Merge pull request #8176 from VinDuv/handle-open-files
QtGui: Handle file open events
2019-06-29 22:22:46 +10:00
Connor McLaughlin
8a122de999
Merge pull request #8192 from Miksel12/qt-changes
Reorder graphics config
2019-06-29 22:21:53 +10:00
Léo Lam
a88deda307
Merge pull request #8193 from lioncash/disasm
Common/GekkoDisassembler: Minor changes
2019-06-29 10:38:36 +02:00
Léo Lam
0c626e6ebc
Merge pull request #8202 from lioncash/build
DolphinQt/CMakeLists: Leverage windeployqt for determining libraries and plugins to copy
2019-06-29 10:29:58 +02:00
Léo Lam
0dfff81a56
Merge pull request #8205 from Techjar/crop-fix
VideoCommon/RenderBase: Fix crop
2019-06-29 10:24:37 +02:00
Léo Lam
a9099fc96b
Merge pull request #8207 from lioncash/macro
VideoCommon/Statistics: Use std::array for projection values
2019-06-29 09:36:33 +02:00
Léo Lam
274b52acb2
Merge pull request #8216 from CookiePLMonster/cpu-override-tick-fix
Fix CPU Clock Override checkbox not updating with GameINI
2019-06-29 08:48:01 +02:00
Léo Lam
75b2b53be2
Merge pull request #8200 from randomstuff/detach_driver
Automatically detach/reattach bluetooth driver in passthrough
2019-06-29 08:46:59 +02:00
Shiz
e647503eb2
Core/HW/WiimoteReal: add missing Linux include
IOLinux.cpp should include <sys/select.h> as it uses select() functionality.
On certain platforms it's included implicitly by other headers, which is why
it compiled before. This makes it also work on musl platforms.
2019-06-29 02:17:58 +02:00
Léo Lam
58c78a495d
Merge pull request #8213 from JosJuice/filesystem-u8string
Work around C++20 std::filesystem changes related to u8string
2019-06-28 19:42:34 +02:00
Léo Lam
6fd435fdff
Merge pull request #8208 from lioncash/fmt
Core/IOS: Use fmt where applicable
2019-06-28 18:53:47 +02:00
Mike Kuijl
e50a6f4c46 Reorder graphics config 2019-06-26 21:59:47 +02:00
Léo Lam
e85fa26768 BTReal: Use FromThread::ANY for USB transfer replies
libusb transfer callbacks might be called immediately during transfer
submission in some cases. (libusb doesn't even specify what thread
the callback is invoked on.) In other words, it is possible to reach
the transfer callback from the CPU thread, and not just from the
USB event handling thread.

So CoreTiming::FromThread::NON_CPU is incorrect and should instead
be ANY.
2019-06-26 17:55:51 +02:00
Léo Lam
cf60a9a7f7 Use separate libusb contexts to avoid thread safety issues
Unfortunately, it appears that using libusb's synchronous transfer API
from several threads causes nasty race conditions in event handling and
can lead to deadlocks, despite the fact that libusb's synchronous API
is documented to be perfectly fine to use from several threads (only
the manual polling functionality is supposed to require special
precautions).

Since usbdk was the only real reason for using a single libusb context
and since usbdk (currently) has so many issues with Dolphin, I think
dropping support for it in order to fix other backends is acceptable.
2019-06-26 17:55:51 +02:00
Silent
09aadf0e9c
Fix CPU Clock Override checkbox not updating with GameINI - also bold it if it's overriden 2019-06-23 22:39:26 +02:00
Silent
9eab3feddf
Fix out of bounds read in HttpRequest::Impl::Fetch logging 2019-06-23 21:44:51 +02:00
Silent
6c21811090
Make DolphinAnalytics a true singleton - static local variables are initialized in a thread safe manner since C++11
Also works around a Visual Studio 2017 bug where static inline class fields are destructed multiple times
2019-06-23 21:43:47 +02:00
spycrab
dacba85a08 UpdaterCommon: Hide Updater before Dolphin quits 2019-06-23 19:47:18 +02:00
spycrab
396546f5c0 Config/ARCodeWidget: Add option for alphabetical sorting 2019-06-22 19:54:13 +02:00
spycrab
1d43d9afc1 Config/GeckoCodeWidget: Add option for alphabetical sorting 2019-06-22 19:54:13 +02:00
spycrab
93393a288c Qt/ARCodeWidget: Support drag and drop reordering 2019-06-22 19:54:13 +02:00
spycrab
389351c6c0 Qt/GeckoCodeWidget: Support drag and drop reordering 2019-06-22 19:54:13 +02:00
JosJuice
c0a6fa5dcc Work around C++20 std::filesystem changes related to u8string 2019-06-21 18:34:21 +02:00
spycrab
d68f62c0f5 Core/NetPlayServer: Fix empty error messages when adding session to the index fails 2019-06-20 20:55:38 +02:00
Anthony
84b9b37fef
Merge pull request #8210 from spycrab/httpreq_error_msg
Common/HttpRequest: Use CURLOPT_ERRORBUFFER for error messages
2019-06-20 10:59:25 -07:00
spycrab
ba4c1c5947 Common/HttpRequest: Use CURLOPT_ERRORBUFFER for error messages 2019-06-20 19:44:51 +02:00
JosJuice
63bb646721 Fix opening controller config when there is no profile directory
https://bugs.dolphin-emu.org/issues/11771
2019-06-20 18:35:14 +02:00
Lioncash
980085e106 Core/IOS: Use fmt where applicable 2019-06-20 11:50:02 -04:00
Lioncash
c1c5276729 VideoCommon/VertexShaderManager: Use std::array where applicable
We can use this to shorten up the initialization code a little bit.

Despite being saved to savestates, this is a non-breaking change.
2019-06-20 08:13:04 -04:00
Lioncash
2e74a4447a VideoCommon/Statistics: Remove unused setter macros for statistics
Now that the floating point members are assigned in bulk, we can remove
their setter macro. While we're at it, we can also remove the setter for
unsigned int, given it's not used.
2019-06-20 08:06:23 -04:00
Lioncash
04c06ec661 VideoCommon/Statistics: Use std::array for projection values
Makes the members within the interface much nicer to look at, and also
makes copying them over much nicer too.
2019-06-20 08:06:20 -04:00
Léo Lam
3cafd0ae81
Merge pull request #8171 from Pokechu22/backend-changing-fix
Disallow changing the backend when running when software renderer is currently selected
2019-06-20 13:58:01 +02:00
Léo Lam
4edf174b61
Merge pull request #8180 from lioncash/fmt
Core/Movie: Use fmt where applicable
2019-06-20 13:56:15 +02:00