Commit Graph
100 Commits
Author SHA1 Message Date
Léo Lam 4705af59c6 Merge pull request #9355 from JosJuice/perfmon
Call UpdatePerformanceMonitor when needed
2020-12-27 16:13:36 +01:00
Léo Lam 2917af03ec Merge pull request #9362 from iwubcode/freelook_fix_crash
VideoCommon: Fix crash that occurs on loading a fifo log when Free Look is enabled
2020-12-27 11:37:50 +01:00
Léo Lam dcc313fd96 Merge pull request #9346 from Sintendo/jitarm64ub
JitArm64: Fix signed bitwise left shift UB
2020-12-26 11:56:33 +01:00
Léo Lam d2f9991b0f Merge pull request #9360 from Minty-Meeo/osreport-split
Split OSREPORT logging type
2020-12-26 11:41:18 +01:00
Léo Lam 0aadb9fd7b Build the gdbstub by default
While the gdbstub is somewhat broken at the moment, building it by
default should keep us from breaking the build (which has happened
several times in the past: #2614, #5904, #8262).

It isn't very intrusive and it does nothing unless it is enabled
in the config file.
2020-12-25 01:21:36 +01:00
Léo Lam ae187818f5 PowerPC: Fix GDBStub build 2020-12-25 01:15:31 +01:00
Léo Lam 6ddf69d094 Merge pull request #9353 from MaddTheSane/patch-1
CMake: Apple Silicon detection
2020-12-24 22:50:27 +01:00
Léo Lam 0ad2f3da45 Core: Remove ImageWrite and get rid of -Wmissing-declarations warnings 2020-12-16 16:04:19 +01:00
Léo Lam eafe005672 Fix -Wclass-memaccess warnings
We want to clear/memset the padding bytes, not just each member,
so using assignment or {} initialization is not an option.

To silence the warnings, cast the object pointer to u8* (which is not
undefined behavior) to make it explicit to the compiler that we want
to fill the object representation.
2020-12-16 15:37:43 +01:00
Léo Lam 6018525992 Qt: Fix deprecated use of MidButton
MidButton has been deprecated since Qt 4.7. The replacement is
MiddleButton.
2020-12-16 14:45:11 +01:00
Léo Lam efdb620783 Qt/Config: Remove unused includes 2020-12-16 14:43:26 +01:00
Léo Lam c59372dbb0 EXI_Device: Always define EXIDEVICE_ETHTAPSERVER for consistency
This keeps the enum values consistent across platforms in case new
entries are added after EXIDEVICE_ETHTAPSERVER.
2020-12-15 20:49:29 +01:00
Léo Lam 2615da820d Merge pull request #9157 from jordan-woyak/wm-emu-tilt-wrap-around
WiimoteEmu: Allow tilt to wrap around and simulate full 360 degree rotations.
2020-12-15 03:14:14 +01:00
Léo Lam 2feb5f204a Merge pull request #9117 from fuzziqersoftware/add-tapserver-bba
Add tapserver network interface for macOS since TunTap is now unmaintained
2020-12-15 03:08:26 +01:00
Léo Lam dbf7c40886 Merge pull request #9309 from devnexen/netbsd_port
NetBSD support proposal.
2020-12-15 02:41:05 +01:00
Léo Lam ded7d1b23d Merge pull request #9285 from AdmiralCurtiss/libpng-1.6.37
Update bundled libpng to version 1.6.37 (from 1.6.29)
2020-12-15 02:24:16 +01:00
Léo Lam ed1564515b Merge pull request #9326 from Subject38/wiimote_deadlock
InputCommon: Fix callback dispatch deadlock
2020-12-15 01:16:59 +01:00
Léo Lam 2c2ec16b53 Merge pull request #9320 from JosJuice/remove-patch-crash
DolphinQt: Fix crash after removing extra patch line
2020-12-15 00:01:07 +01:00
Léo Lam 214ea8ff18 Merge pull request #9328 from AdmiralCurtiss/memory-view-crash
Core/AddressSpace: Return null accessors when no game is running to prevent out-of-bounds memory accesses.
2020-12-14 03:18:45 +01:00
Léo Lam 3634508e46 Merge pull request #9311 from JosJuice/config-get-fast-2
Add caching to Config::Info
2020-12-13 03:55:39 +01:00
Léo Lam 9bb8107a05 Merge pull request #9319 from JosJuice/default-enabled-no-propagate
Core: Don't copy default _Enabled sections to user INIs
2020-12-11 17:24:52 +01:00
Léo Lam 7d9276c340 Merge pull request #9317 from JosJuice/default-enabled-codes
GameSettings: Enable compatibility patches by default
2020-12-11 10:40:03 +01:00
Léo Lam fd5c69deca Merge pull request #9289 from AdmiralCurtiss/simple-png-api-write
Use Simplified libpng API for writing PNGs.
2020-12-11 10:24:16 +01:00
Léo Lam 2e63cc8313 Merge pull request #9307 from Dentomologist/add-deleted-file-missing-warning-flag
Add File::Delete and File::DeleteDir warning flags
2020-12-11 02:06:28 +01:00
Léo Lam 19324e6ed9 Merge pull request #9313 from leoetlino/check-content-hashes
WiiUtils: Check hashes to determine if a title is installed and up-to-date
2020-12-08 15:45:12 +01:00
Léo Lam f7d7bbf55f WiiUtils: Check hashes to determine if a title is installed and up-to-date
Nintendo's official title installation code and ES both only look at
content IDs but we should probably check for content hashes in addition
to checking for IDs for at least two reasons:

1. Some of the installed contents could be corrupted -- this cannot be
   easily detected without checking hashes.

2. Some mod distributors do not bother to update content IDs, which
   means that installing updates from the UI would not actually
   update the installed game. This is confusing for users.

To keep the existing semantic (for IOS especially), the new content
hash checks are opt-in for callers of GetStoredContentsFromTMD.

This commit changes WiiUtils's WAD installation logic to enable
the content hash checks.
2020-12-06 01:53:55 +01:00
Léo Lam 2952f99f69 Merge pull request #9312 from iwubcode/dynamic-input-textures-fix
InputCommon: fix dynamic input textures when host key isn't mapped
2020-12-06 00:46:06 +01:00
Léo Lam c8cb330df0 Merge pull request #9310 from leoetlino/compile-time-errors-format
Turn format string issues into compile-time errors
2020-12-05 23:58:04 +01:00
Léo Lam d8b9a040ed Merge pull request #9275 from JosJuice/framedump-boot-time
FrameDump: Start timing at 0 ticks when starting from boot
2020-12-05 23:57:41 +01:00
Léo Lam 585899dba3 Turn format string issues into compile-time errors
If the compiler can detect an issue with a format string at compile
time, then we should take advantage of that and turn the issue into a
hard compile-time error as such problems almost always lead to UB.

This helps with catching logging or assertion messages that have been
converted over to fmt but are still using the old, non-fmt variants
of the logging macros.

This commit also fixes all incorrect usages that I could find.
2020-12-04 18:06:02 +01:00
Léo Lam dbc0fd1d89 Merge pull request #9305 from r-burns/discord
Exclude Discord RPC lib from installation
2020-12-03 11:51:53 +01:00
Léo Lam b148b56fba Merge pull request #9304 from lioncash/panic
General: Convert PanicAlerts over to fmt equivalent
2020-12-02 20:45:27 +01:00
Léo Lam a5880fa402 Qt: Add missing tr calls for tooltip descriptions 2020-11-30 14:04:08 +01:00
Léo Lam d043c5f81d Merge pull request #9153 from iwubcode/qt_custom_tooltip
Remove description box in graphics tabs and use custom tooltips instead
2020-11-29 12:37:31 +01:00
Léo Lam 361bf25cf8 Merge pull request #9254 from flagrama/fallback-region-selection
Fallback Region Option
2020-11-29 00:19:15 +01:00
Léo Lam 738e1a6dbb Merge pull request #9297 from JosJuice/movie-game-id-comparison
Movie: Fix 83b9fef regressions
2020-11-29 00:09:30 +01:00
Léo Lam cf32c4d479 Merge pull request #9296 from JosJuice/issue-12327-workaround
JitArm64: Add a workaround for issue 12327
2020-11-28 22:44:37 +01:00
Léo Lam c0f7f91507 Core: Fix an assertion that mistakenly uses a fmt format string
Unfortunately, adding a DEBUG_ASSERT_MSG_FMT isn't actually possible
right now because of compiler bugs:
https://github.com/dolphin-emu/dolphin/pull/9284

We could require a newer version of GCC (10) but that would require
updating GCC on the build machines.

For what it's worth, older versions of GCC (8, 9) are broken in
many ways: adding constexpr to some Matrix functions causes GCC 8
to generate bugged code that causes the Wii IR pointer to disappear,
which means that the generated builds are already unusable
(see https://dolp.in/i12324).

Additionally,  we've already had to add workarounds for those versions
in the format macros to fix compilation bugs. This time, it looks like
workarounds won't cut it; even applying the workaround
described in https://github.com/fmtlib/fmt/pull/1580 does not help.
2020-11-28 21:11:27 +01:00
Léo Lam a9845e0a3d Merge pull request #9191 from sepalani/net-interface
IP/Top: Add Android network interface
2020-11-28 18:22:33 +01:00
Léo Lam a34f19cb96 Merge pull request #9291 from lioncash/alert-audio
AudioCommon: Convert alerts over to fmt-based variants
2020-11-28 16:33:50 +01:00
Léo Lam 5a554e8e5d Merge pull request #9292 from Dentomologist/fix-liblzma-config-on-macOS
Fix liblzma config on macOS
2020-11-28 16:32:56 +01:00
Léo Lam 9b03cdf93e Merge pull request #9101 from sepalani/fix-ip-fallback
IP/Top: Fix fallback IP address
2020-11-27 02:39:15 +01:00
Léo Lam 2a85534805 Merge pull request #9283 from JosJuice/config-get-speedup
Common: Optimize Config::Get
2020-11-27 02:36:33 +01:00
Léo Lam cecbc65ea0 Merge pull request #9286 from lioncash/core-log6
Frontends: Migrate logs over to fmt
2020-11-27 02:17:25 +01:00
Léo Lam 4c9ffb58fa Merge pull request #9250 from Dentomologist/fix-fst-error
Fix file rename errors on Windows
2020-11-26 02:09:30 +01:00
Léo Lam e00572dd07 Merge pull request #9282 from lioncash/core-log5
Core: Convert logging over to fmt pt.5
2020-11-26 02:06:41 +01:00
Léo Lam d573ce34d7 Merge pull request #9281 from AdmiralCurtiss/iofile-write-string
IOFile: Replace fprintf with WriteString/fmt.
2020-11-26 01:39:56 +01:00
Léo Lam 3891ac2682 Merge pull request #9232 from AdmiralCurtiss/show-result-value-in-expression-editor
Qt/IOWindow: Show result value in expression editor.
2020-11-26 01:30:12 +01:00
Léo Lam 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
Léo Lam 140daf5960 Merge pull request #9268 from leoetlino/devicememcard-minor-cleanup
EXI_DeviceMemoryCard: Medium cleanup
2020-11-25 10:07:44 +01:00
Léo Lam 12a215c232 Merge pull request #9277 from JosJuice/gles-vertex-uber
Fix vertex ubershader GLES compile errors
2020-11-25 10:04:45 +01:00
Léo Lam 4a21be5d77 Merge pull request #9278 from lioncash/latent
Core: Convert missed log calls over to fmt
2020-11-25 09:58:40 +01:00
Léo Lam 17b11cf4a4 Merge pull request #9095 from JosJuice/android-reset-setting
Android: Long press a setting to reset it
2020-11-23 02:50:40 +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
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
Léo Lam f53a7a2b66 CMake: Pass various /Zc flags to MSVC for consistency with Base.props
https://github.com/dolphin-emu/dolphin/pull/9037/commits/969ea6e4f54f1021edaa8f565e20b17a78f6f753

Fixes non-conformant handling of __VA_ARGS__.
2020-11-21 14:43:26 +01:00
Léo Lam 608dd6a37b Merge pull request #9122 from Pokechu22/pr-4601-test
Fix Super Mario Sunshine debug cubes (originally PR #4601 by stenzek)
2020-11-21 02:55:50 +01: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 4b7f784d1b Disable -Wstringop-truncation warnings
Disable -Wstringop-truncation warnings as they result in many false
positives.

In most (all?) cases where std::strncpy is used, we want to fill the
entire buffer or match emulated code that also ignores the null
terminator, so the warnings are not useful.

Given that Dolphin itself mostly uses std::string, they do not
really help catch any bugs.
2020-11-21 02:08:08 +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
Léo Lam ade9f92a63 Enable extra warnings in Source CMakeLists, not in root CMakeLists
Having extra warnings enabled for everything including external
libraries produces an overwhelming amount of warnings in code that
isn't even part of our codebase.

Move the various warning flags to Source/CMakeLists.txt to get rid
of those useless warnings.

Note that the Source CMakeLists.txt is already where the MSVC warnings
are defined, so this commit improves consistency as well.
2020-11-21 00:59:17 +01:00
Léo Lam fa73b1a23f Merge pull request #9269 from JosJuice/fmt-positional-checks
Common: Assert that translatable strings use positional arguments
2020-11-21 00:29:43 +01:00
Léo Lam 33f15f22e2 Merge pull request #9266 from JosJuice/android-startup-illegalstate
Android: Fix IllegalStateException on startup
2020-11-20 22:13:30 +01:00
Léo Lam f82145d9dd EXI_DeviceMemoryCard: Use std::array 2020-11-20 19:41:23 +01:00
Léo Lam f81062f561 EXI_DeviceMemoryCard: Use enum class for Command 2020-11-20 19:38:07 +01:00
Léo Lam b2f00be637 EXI_DeviceMemoryCard: Fix member variable names 2020-11-20 19:37:39 +01:00
Léo Lam 1f15119f80 EXI_DeviceMemoryCard: Use override rather than virtual 2020-11-20 19:36:34 +01:00
Léo Lam 279197b278 EXI_DeviceMemoryCard: Use more efficient overload of find_last_of 2020-11-20 19:36:34 +01:00
Léo Lam 4ad88ce2e4 EXI_DeviceMemoryCard: Clean up casts and implicit conversions 2020-11-20 19:36:33 +01:00
Léo Lam e144d20dd6 EXI_DeviceMemoryCard: Remove unused include 2020-11-20 18:51:16 +01:00
Léo Lam 2631243379 EXI_DeviceMemoryCard: Rename variables to follow our naming conventions 2020-11-20 18:51:16 +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
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
Léo Lam 1d4672455c Merge pull request #9130 from flto/master
Vulkan: fix validation error in bSupportsGeometryShaders=false case
2020-11-20 12:35:40 +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
Léo Lam a4aec0556b Merge pull request #9212 from nf6429/master-diff
Game INI Changes
2020-11-20 11:10:52 +01:00
Léo Lam 858d7612ef Merge pull request #9170 from JosJuice/android-extension-hack-2
Android: Remove hacks for Wii Remote extension setting, round 2
2020-11-20 02:47:23 +01:00
Léo Lam 30bffca5c3 Merge pull request #9193 from JosJuice/android-clear-motioncontrolsenabled
Android: Re-add motionControlsEnabled to clearWiimoteNewIniLinkedPreferences
2020-11-20 02:37:51 +01: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
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 c724447f80 Merge pull request #9259 from Strum355/utf8-source
Fixed non-UTF8 chars in PeakFinder.cpp
2020-11-19 17:23:00 +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
Léo Lam 7e9a2dcc72 Merge pull request #9261 from AdmiralCurtiss/shop-logs
WiiUtils: Create Wii Shop log files when installing a WAD.
2020-11-19 16:49:34 +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
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
Léo Lam b8bc6c3c86 Merge pull request #9256 from JosJuice/android-keep
Android: Add @Keep annotation to things accessed using JNI
2020-11-18 01:01:34 +01:00
Léo Lam 8119318907 Merge pull request #9257 from JosJuice/redundant-i18n
Remove a redundant i18n comment
2020-11-18 00:56:58 +01:00
Léo Lam 07be82d64f Merge pull request #9253 from JosJuice/positional-arguments
Use positional arguments in all translatable fmt strings
2020-11-17 18:02:39 +01:00