Commit graph

24963 commits

Author SHA1 Message Date
blåhaj
bf0fe0281a Fix bounding box incorrectly disabled on OpenGL ES 3.1, 3.2 2020-11-24 21:22:39 +01:00
Léo Lam
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
JosJuice
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
Léo Lam
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
JosJuice
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
Lioncash
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
Léo Lam
9efc81ae98
Fix variable shadowing warnings 2020-11-21 02:08:09 +01:00
Léo Lam
7840f61524
Silence "missing switch cases" warnings 2020-11-21 02:08:09 +01:00
Léo Lam
6ab1ab1f12
Fix -Wmaybe-uninitialized warnings 2020-11-21 02:08:09 +01:00
Léo Lam
82f1e6204d
Fix -Wsign-compare warnings 2020-11-21 02:08:09 +01:00
Léo Lam
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
Stenzek
d6ce8eef36 Software: Use same logic for colors as hardware backends 2020-11-20 15:54:06 -08:00
Stenzek
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
JosJuice
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
JosJuice
e63b00e562 Fix translatable strings which contain non-positional arguments 2020-11-20 20:24:30 +01:00
Léo Lam
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
Léo Lam
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
Léo Lam
88cc1b7c8a
DSP: Fix one DEBUG_LOG call 2020-11-20 16:21:05 +01:00
Lioncash
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
Léo Lam
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
Jonathan Marek
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
Léo Lam
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
Dentomologist
7ded075561 DolphinQt: Add Show/Hide All options to gamelist region menu 2020-11-19 20:39:49 -08:00
Léo Lam
7f7fd4d8d3
Merge pull request #9220 from jordan-woyak/ext-crypto
WiimoteEmu: Implement extension encryption edge case.
2020-11-20 02:28:17 +01:00
Léo Lam
bca82bb942
Merge pull request #9239 from altimumdelta/FFDUMP_Separate_Logging
FrameDump Logging: Separate log type and migrate to fmt
2020-11-20 02:21:57 +01:00
Léo Lam
5921a93d71
Merge pull request #9247 from Dentomologist/fix-updater-temporary-folder
Fix updater not always cleaning up temp directory
2020-11-20 02:01:43 +01:00
Léo Lam
eff566b318
Merge pull request #9258 from lioncash/core-log
Core: Convert logging over to fmt pt. 1
2020-11-19 20:32:19 +01:00
Lioncash
958cbf38a4 Core: Convert logging over to fmt pt. 1
Converts up to the DSP-related files for easier reviewing, the rest will
be progressively moved over after this change gets merged.
2020-11-19 14:21:06 -05:00
Léo Lam
e3247b567d
Merge pull request #9185 from Losuc/skipEFBaccessHotkey
Add a Skip EFB Access Hotkey
2020-11-19 17:28:45 +01:00
Léo Lam
dde6090e98
Common/MsgHandler: Add compile-time format string checks 2020-11-19 17:09:24 +01:00
Léo Lam
62eeb05519
Common: Validate the number of {} fields in format strings
Unfortunately, {fmt} allows passing too many arguments to a format call
without raising any runtime or compile-time error [1].

As this is a common source of bugs since we started migrating to {fmt},
this commit adds some custom logic to validate the number of
replacement fields in format strings in addition to {fmt}'s own checks.

[1] https://github.com/fmtlib/fmt/issues/492
2020-11-19 17:09:24 +01:00
Léo Lam
47c91696ee
Common/Log: Check format strings
Helps with catching incorrect format strings.

PanicAlertFmt already uses FMT_STRING and fmt::make_args_checked.
2020-11-19 17:09:24 +01:00
Admiral H. Curtiss
83c235b7cb WiiUtils: Create Wii Shop log files when installing a WAD.
Fixes https://bugs.dolphin-emu.org/issues/12269
2020-11-19 03:26:27 +01:00
Léo Lam
4eecb8fd11
Merge pull request #9248 from lioncash/video-fmt
VideoCommon: Migrate over to fmt
2020-11-18 11:10:48 +01:00
Lioncash
3d9b2aa005 VideoCommon: Migrate over to fmt
Migrates off the printf-based formatting where applicable.
2020-11-17 21:23:58 -05:00
Léo Lam
eb1581bbcc
Merge pull request #9246 from JosJuice/translation-eot
DolphinQt: Don't return 0x04 bytes from tr
2020-11-18 02:31:13 +01:00
Léo Lam
31d7be521c
Merge pull request #7714 from cristian64/avoid_leaking_gamelistmodel
DolphinQt: Avoid leaking the GameListModel instance to gracefully shutdown the GameTracker and prevent a crash on exit
2020-11-18 02:14:51 +01:00
Léo Lam
0339889806
Merge pull request #9251 from sepalani/sockopt
IP/Top: Add missing sockopt
2020-11-18 02:10:37 +01:00
JosJuice
52c615f1b1 Remove a redundant i18n comment 2020-11-17 18:23:27 +01:00
JosJuice
9a01c3fb9f Use positional arguments in all translatable fmt strings
We want to use positional arguments in translatable strings
that have more than one argument so that translators can change
the order of them, but the question is: Should we also use
positional arguments in translatable strings with only one
argument? I think it makes most sense that way, partially
so that translators don't even have to be aware of the
non-positional syntax and partially because "translatable
strings use positional arguments" is an easier rule for us
to remember than "transitional strings which have more than
one argument use positional arguments". But let me know if
you have a different opinion.
2020-11-16 13:28:11 +01:00
Dentomologist
6dcf7643e5 Fix updater not always cleaning up temp directory
Updater was only deleting TempUpdate folder when an error occured.
2020-11-13 12:25:53 -08:00
JosJuice
53da97208a DolphinQt: Don't return 0x04 bytes from tr
tr calls with more than one argument would have a 0x04 byte
in the returned string when no translation was found
(which always is the case when using Dolphin in English).
2020-11-12 19:44:44 +01:00
Léo Lam
8a621c2d5e
Merge pull request #9236 from lioncash/log-backend
VideoBackends: Migrate logging over to fmt
2020-11-12 14:51:28 +01:00
Léo Lam
ec5313fe24
Merge pull request #9204 from fbastos1/master
fix emulator issue #12139
2020-11-12 14:43:35 +01:00
Lioncash
d8e1921b57 InputCommon: Migrate over to fmt-capable panic alerts
Continues the migration over to fmt.
2020-11-12 02:29:26 -05:00
Lioncash
689eec5304 DiscIO: Make use of fmt-capable panic alerts
Migrates the DiscIO code over to fmt.
2020-11-11 01:09:42 -05:00
LC
ae83685b0b
Merge pull request #9237 from lioncash/msghandler
Common/MsgHandler: Add fmt-capable variants of the alert macros
2020-11-11 00:34:45 -05:00
altimumdelta
f44b13ffcd FrameDump Logging: Separate log type and migrate to fmt 2020-11-10 17:17:43 +01:00
LC
0a2564a89d
Merge pull request #9234 from lioncash/rename-fmt
ShaderGenCommon: Rename WriteFmt() to Write()
2020-11-09 22:08:42 -05:00