Commit Graph

26642 Commits

Author SHA1 Message Date
1734cf55d8 Fix file rename errors on Windows
On Windows, when the Rename function fails to replace an existing file
it will now retry the operation multiple times with increasingly long
delays between attempts.  This fixes transient rename failures.

I've been getting sporadic yet annoyingly frequent errors saying:
'IOS_FS: Failed to rename temporary FST file'
These typically appear on startup but I've also gotten them randomly.

Investigation shows this happens when the Windows ReplaceFile function
returns the error ERROR_UNABLE_TO_REMOVE_REPLACED.  That happens in the
context of using ReplaceFile to perform an atomic file overwrite, which
is required when saving updates to a file to avoid corruption.  The
error mainly happens with the /Wii/fst.bin file but I've seen it
happen with multiple other files as well.

I haven't been able to definitively pin down why the error occurs,
though online discussions suggest antivirus scanning may be a major
culprit.  That said, I've excluded the Dolphin folder from Windows
Defender scans to no avail and don't have any other antivirus running,
so this is likely to be a problem others are experiencing as well.

The number and duration of retry delays is arbitrary but I feel like a
combined second or so in the worst case is an acceptable tradeoff for
the reduction (actually elimination in my experience) of those errors.
This is even more true when you consider the time it takes to read and
dismiss the error dialogs.
2020-11-25 16:12:58 -08:00
11e226a91a Qt/IOWindow: Remove Apply button. 2020-11-26 00:47:37 +01:00
334100509b Qt/IOWindow: Show the current value of the expression. 2020-11-26 00:46:51 +01:00
ddfb8fa404 Qt/IOWindow: Apply expressions immediately so we can query the current value of the expression. 2020-11-26 00:45:31 +01:00
45d4746a5d IOFile: Replace all fprintf string writing with calls to WriteString. 2020-11-25 22:11:21 +01:00
ef75e9acd8 Core: Convert logging over to fmt pt.5
Converts the remaining PowerPC code over to fmt-capable logging.

Now, all that's left to convert over are the lingering remnants within
the frontend code.
2020-11-25 13:23:48 -05:00
2f264c6448 Common: Optimize Config::Get
The way Config::Get works in master, it first calls
Config::GetActiveLayerForConfig which searches for the
setting in all layers, and then calls Config::Layer::Get
which searches for the same setting again within the given
layer. We can remove this second search by combining the
logic of Config::GetActiveLayerForConfig and
Config::Layer::Get into one function.
2020-11-25 16:26:13 +01:00
9c590e215f IOFile: Add WriteString() method to replace fprintf string writing. 2020-11-25 15:41:25 +01:00
e2a019ae9a Merge pull request #9276 from lioncash/core-log4
Core: Convert logging over to fmt pt.4
2020-11-25 13:21:23 +01:00
140daf5960 Merge pull request #9268 from leoetlino/devicememcard-minor-cleanup
EXI_DeviceMemoryCard: Medium cleanup
2020-11-25 10:07:44 +01:00
12a215c232 Merge pull request #9277 from JosJuice/gles-vertex-uber
Fix vertex ubershader GLES compile errors
2020-11-25 10:04:45 +01:00
4a21be5d77 Merge pull request #9278 from lioncash/latent
Core: Convert missed log calls over to fmt
2020-11-25 09:58:40 +01:00
bf0fe0281a Fix bounding box incorrectly disabled on OpenGL ES 3.1, 3.2 2020-11-24 21:22:39 +01:00
d01f85cfd8 Add Rock Band 3 MIDI PRO Adapter to known Wii peripherals
Based on info from https://forums.dolphin-emu.org/Thread-emulate-midi-pro-adapter
2020-11-24 14:25:19 +01:00
eedfe2abf1 Core: Convert missed log calls over to fmt 2020-11-23 12:20:02 -05:00
6cd718163f Core: Convert logging over to fmt pt.4
Continues the migration of logging in the Core library. This part
finishes up the remaining log calls within the IOS code.
2020-11-23 11:53:21 -05:00
28c696fa74 Fix vertex ubershader GLES compile errors
Regression from 51724c1.
2020-11-23 11:42:41 +01:00
b555f0fb93 Merge pull request #9265 from lioncash/core-log3
Core: Convert logging over to fmt pt.3
2020-11-23 02:46:58 +01:00
b53127a1fa Merge pull request #9274 from JosJuice/av-register-all
FrameDump: Re-add call to av_register_all
2020-11-22 12:45:59 +01:00
79f50cd4fd IP/Top: Fix fallback IP address 2020-11-22 15:34:27 +04:00
5d9eb8f6ce Merge pull request #9271 from leoetlino/warnings
Fix several warnings and only enable extra warnings for our own code
2020-11-22 02:04:53 +01:00
118d056410 FrameDump: Re-add call to av_register_all
This was removed in 4902146329.
We still need this for the ffmpeg version we're using on Windows.
2020-11-22 00:11:23 +01:00
cbbf044064 Core: Convert logging over to fmt pt.3
Continues the migration over to fmt up to IOS' ES module.
2020-11-21 05:56:37 -05:00
LC
41b79a66c7 Merge pull request #9270 from leoetlino/dtm-gameid-null
Core/Movie: Fix a likely out-of-bounds read for PanicAlertT
2020-11-21 01:53:15 -05:00
9efc81ae98 Fix variable shadowing warnings 2020-11-21 02:08:09 +01:00
7840f61524 Silence "missing switch cases" warnings 2020-11-21 02:08:09 +01:00
6ab1ab1f12 Fix -Wmaybe-uninitialized warnings 2020-11-21 02:08:09 +01:00
82f1e6204d Fix -Wsign-compare warnings 2020-11-21 02:08:09 +01:00
83b9feff90 Core/Movie: Fix a likely out-of-bounds read for PanicAlertT
gameID isn't null terminated since it is just an std::array<char, 6>
and .data() returns a char* so {fmt} would go way beyond the bounds of
the array when it attempts to determine the length of the string.

The fix is to pass a std::string_view to {fmt}. This commit adds
a GetGameID() function that can also be used to simplify
string comparisons.
2020-11-21 01:30:02 +01:00
d6ce8eef36 Software: Use same logic for colors as hardware backends 2020-11-20 15:54:06 -08:00
51724c1ccd LightingShaderGen: Always calculate lighting for both color channels
Cel-damage depends on lighting being calculated for the first channel
even though there is no color in the vertex format (defaults to the
material color). If lighting for the channel is not enabled, the vertex
will use the default color as before.

The default value of the color is determined by the number of elements in
the vertex format. This fixes the grey cubes in Super Mario Sunshine.

If the color channel count is zero, we set the color to black before the
end of the vertex shader. It's possible that this would be undefined
behavior on hardware if a vertex color index that was greater than the
channel count was used within TEV.
2020-11-20 15:54:04 -08:00
e4ceed2bed Common: Assert that translatable strings use positional arguments
Like PR 9260, but for a different requirement (see PR 9253).
2020-11-20 20:24:30 +01:00
e63b00e562 Fix translatable strings which contain non-positional arguments 2020-11-20 20:24:30 +01:00
f82145d9dd EXI_DeviceMemoryCard: Use std::array 2020-11-20 19:41:23 +01:00
f81062f561 EXI_DeviceMemoryCard: Use enum class for Command 2020-11-20 19:38:07 +01:00
b2f00be637 EXI_DeviceMemoryCard: Fix member variable names 2020-11-20 19:37:39 +01:00
1f15119f80 EXI_DeviceMemoryCard: Use override rather than virtual 2020-11-20 19:36:34 +01:00
279197b278 EXI_DeviceMemoryCard: Use more efficient overload of find_last_of 2020-11-20 19:36:34 +01:00
4ad88ce2e4 EXI_DeviceMemoryCard: Clean up casts and implicit conversions 2020-11-20 19:36:33 +01:00
e144d20dd6 EXI_DeviceMemoryCard: Remove unused include 2020-11-20 18:51:16 +01:00
2631243379 EXI_DeviceMemoryCard: Rename variables to follow our naming conventions 2020-11-20 18:51:16 +01:00
542c49bab0 Core: Fix invalid lambda captures
PR #9260 made the MsgAlert macros use lambdas so that local
constexpr variables can be added while keeping the ability to
return a boolean from the macros.

Unfortunately, C++17 forbids referring to structured bindings in lambda
captures. This is fixed in P1091R3 but we cannot rely on C++20 yet...
2020-11-20 18:27:56 +01:00
f45a4a5916 Merge pull request #9263 from lioncash/core-log2
Core: Convert logging over to fmt pt.2
2020-11-20 16:36:47 +01:00
88cc1b7c8a DSP: Fix one DEBUG_LOG call 2020-11-20 16:21:05 +01:00
a0f9b041a0 Core: Convert logging over to fmt pt.2
Continues the core migration of logs up to the EXI handling code.
2020-11-20 10:05:44 -05:00
419dfe4be4 Merge pull request #9260 from leoetlino/fmt-checks
Common/Log: Add compile-time format string checks
2020-11-20 16:05:25 +01:00
a20e69ff51 Vulkan: fix validation error in bSupportsGeometryShaders=false case
In CreateDescriptorSetLayouts(), one less dynamic binding is created when
bSupportsGeometryShaders=false. Reduce the dynamicOffsetCount argument by
one in that case. Avoids this validation error:

Attempting to bind 3 descriptorSets with 2 dynamic descriptors, but
dynamicOffsetCount is 3. It should exactly match the number of dynamic
descriptors. The Vulkan spec states: dynamicOffsetCount must be equal to
the total number of dynamic descriptors in pDescriptorSets

Signed-off-by: Jonathan Marek <jonathan@marek.ca>

[Applied clang-format]
Signed-off-by: Léo Lam <leo@leolam.fr>
2020-11-20 12:23:34 +01:00
c580a70a12 Merge pull request #9210 from Dentomologist/regions-show-hide-all
DolphinQt: Add Show/Hide All options to gamelist region menu
2020-11-20 11:35:22 +01:00
7ded075561 DolphinQt: Add Show/Hide All options to gamelist region menu 2020-11-19 20:39:49 -08:00
7f7fd4d8d3 Merge pull request #9220 from jordan-woyak/ext-crypto
WiimoteEmu: Implement extension encryption edge case.
2020-11-20 02:28:17 +01:00