Commit Graph
100 Commits
Author SHA1 Message Date
Léo Lam bc14e4a0f0 Merge pull request #9463 from Dentomologist/fix_CreateTempDir_calls
UnitTests: Add setup error checking
2021-01-27 13:12:05 +01:00
Léo Lam 093978b2e0 Merge pull request #9466 from iwubcode/common_controllers_widget
DolphinQt: Move common controller interface logic to its own widget
2021-01-27 13:06:20 +01:00
Léo Lam d8bea87aa3 Merge pull request #9469 from Stevoisiak/remove-redundant-inis
Remove redundant INI settings
2021-01-27 12:43:51 +01:00
Léo Lam 2d75b0d2bc Merge pull request #9472 from JosJuice/jitarm64-unexpected-double
JitArm64: Update registers last used before start of instruction
2021-01-27 12:43:11 +01:00
Léo Lam 0776263c5e Merge pull request #9428 from JosJuice/tv-folder-picker
Android: Use old folder picker on Android TV
2021-01-09 11:54:02 +01:00
Léo Lam 4cdcbb6ab2 Merge pull request #9308 from smurf3tte/re23_patch
Patches for Resident Evil 2/3 audio issues
2021-01-06 01:52:15 +01:00
Léo Lam 0b1db65aa1 Merge pull request #9405 from Filoppi/patch-7
Rename "Use Fullscreen" setting to "Start in Fullscreen"
2021-01-06 01:44:46 +01:00
Léo Lam eafb9de047 Merge pull request #9323 from waddlesplash/haiku
Rehabilitate Haiku support.
2021-01-05 16:09:43 +01:00
Léo Lam 840ecfb32f Merge pull request #9409 from AdmiralCurtiss/wii-save-import-tmd
Make WiiSave::Import() behave closer to the Wii System Menu's SD Card save copying.
2021-01-05 15:36:36 +01:00
Léo Lam e48377dfc6 Merge pull request #9404 from Filoppi/patch-5
Fix typos and code coding conventions
2021-01-05 15:33:43 +01:00
Léo Lam ee25f03ff9 Merge pull request #9418 from Filoppi/patch-10
Fix DualShockUDP not adding/removing devices correctly
2021-01-05 15:15:53 +01:00
Léo Lam 9069ad6cce Merge pull request #9420 from MerryMage/ext
Externals: Link against required libraries
2021-01-05 15:15:15 +01:00
Léo Lam fcdcdd7beb Merge pull request #9410 from lioncash/enum2
Arm64Emitter: Convert ArithOption enums into enum classes
2021-01-01 13:25:35 +01:00
Léo Lam 452aad29f1 Merge pull request #9401 from lioncash/jittable
JitArm64_Tables: Construct tables at compile-time
2021-01-01 01:22:49 +01:00
Léo Lam 344a74aa11 Merge pull request #9396 from lioncash/arm
JitArm64_RegCache: Interface cleanup
2021-01-01 01:03:55 +01:00
Léo Lam f59ee87031 Merge pull request #9402 from lioncash/emitter
Arm64Emitter: Interface cleanup
2021-01-01 00:52:40 +01:00
Léo Lam 8a3b14d7dc Merge pull request #9391 from lioncash/find-str
IOS: Allow for heterogenous name lookup
2020-12-30 01:47:01 +01:00
Léo Lam 806a4f3a9a Merge pull request #9393 from lioncash/sysconf
SysConf: Make use of std::string_view
2020-12-30 01:22:39 +01:00
Léo Lam 716497fbce Merge pull request #9394 from lioncash/recurse
Core: Use C++17 deduction guides with locked recursive mutexes
2020-12-30 00:47:43 +01:00
Léo Lam 3b2e31230f Merge pull request #9386 from leoetlino/config-cache-invalidate
Config: Fix cache not being invalidated when callbacks are suppressed
2020-12-29 22:22:15 +01:00
Léo Lam 9ffd345df0 Config: Fix cache not being invalidated when callbacks are suppressed
The config version should always be incremented whenever config is
changed, regardless of callbacks being suppressed or not.
Otherwise, getters can return stale data until another config change
(with callbacks enabled) happens.
2020-12-29 22:07:47 +01:00
Léo Lam 351fb71653 Merge pull request #9387 from lioncash/priv
DSPCore: Make several SDSP members private
2020-12-29 22:05:11 +01:00
Léo Lam 41316daf91 Merge pull request #9384 from lioncash/mbox-enum
DSP: Convert Mailbox enum into an enum class
2020-12-29 19:57:55 +01:00
Léo Lam ee048ad83c Merge pull request #9377 from lioncash/analyzer
DSPAnalyzer: Migrate off file-scope state
2020-12-29 18:04:54 +01:00
Léo Lam 5ff2cb9a74 Merge pull request #9383 from lioncash/cr-fn
DSP: Eliminate some magic values related to the CR register
2020-12-29 17:37:24 +01:00
Léo Lam 15d4ddf5da Merge pull request #9379 from Pokechu22/audio-latency-disable
Fix latency field being initially enabled on audio backends not supporting it
2020-12-29 17:28:10 +01:00
Léo Lam 5e186f4830 Merge pull request #9382 from lioncash/precise
DSPCore: Move PRECISE_BACKLOG define to the interpreter code
2020-12-29 17:17:59 +01:00
Léo Lam f21e1d1859 Merge pull request #9381 from JosJuice/fix-core-filters
Fix Core.vcxproj.filters
2020-12-29 17:16:56 +01:00
Léo Lam 9b3cdd0645 IOS/WD: Report game quirk if unimplemented ioctl is used
Lets us find games to test more easily.
2020-12-28 16:15:17 +01:00
Léo Lam 9a87d27612 IOS/WD: Implement more parts of the interface
This commit implements the following commands:

* open
* close
* GetMode
* SetLinkState (used to actually trigger scanning)
* GetLinkState (used to check if the driver is in the expected state)
* GetInfo
* RecvFrame and RecvNotification (stubbed)
* Disassociate (stubbed)

GetInfo was already implemented, but the structure wasn't initialized
correctly so the info was being rejected by official titles.
That has also been fixed in this commit.

Some of the checks may seem unimportant but official titles actually
require WD to return error codes... Failing to do so can cause hangs
and softlocks when DS communications are shut down.

This minimal implementation is enough to satisfy the Mii channel
and all other DS games, except Tales of Graces (https://dolp.in/i11977)
which still softlocks because it probably requires us to actually
feed it frame data.
2020-12-28 16:15:17 +01:00
Léo Lam dcbe81b880 IOS: Simplify usage of GetVector
By making GetVector return nullptr for invalid indices, we don't have
to check the total number of vectors all the time before calling
GetVector.
2020-12-28 16:12:04 +01:00
Léo Lam 4fea832f49 IOS/NCD: Implement Lock/Unlock more accurately
NCD returns an error if it receives a request to lock the driver
when it is already locked.

Emulating this may seem pointless, but it turns out PPC-side code
expects NCD to return an error and will immediately fail and stop
initialising wireless stuff if NCD succeeds.
2020-12-28 16:12:04 +01:00
Léo Lam 3f68aceaca Merge pull request #9348 from lioncash/dsp-deglobal
DSP: Eliminate most global state
2020-12-28 15:48:11 +01:00
Léo Lam e509353eb0 Merge pull request #9372 from jordan-woyak/cmake-version-warnings
CMake: Update cmake_minimum_required calls using versions less than 2.8.12.
2020-12-28 12:20:46 +01:00
Léo Lam 506cbd336a Merge pull request #9375 from iWeaker4you/master
BitUtils: Fix uint64_t gcc compile (Linux)
2020-12-28 12:18:27 +01:00
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