Commit Graph

146 Commits

Author SHA1 Message Date
110d32729e Simplify std::find with Common::Contains
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp).

The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
2025-01-01 09:52:03 -08:00
d296b2613c Modernize std::adjacent_find with ranges 2024-10-10 15:28:11 -07:00
6ca2da53e8 Partially revert "Revert "Audit uses of IsRunning and GetState""
This reverts the revert commit bc67fc97c3,
except for the changes in BaseConfigLoader.cpp, which caused the bug
that made us revert 72cf2bdb87. PR 12917
contains an improved change to BaseConfigLoader.cpp, which can be merged
(or rejected) independently.

A few changes have also been made based on review comments.
2024-10-04 18:35:41 +02:00
d7c93d87be Add support for libfmt-11
fmt::join was moved into fmt/ranges.h

Signed-off-by: Alfred Wingate <parona@protonmail.com>
2024-08-22 16:54:35 +03:00
618b41a459 Use 'contains' method 2024-08-14 22:18:28 +02:00
bc67fc97c3 Revert "Audit uses of IsRunning and GetState"
This reverts commit 72cf2bdb87.

SYSCONF settings are getting cleared when they shouldn't be. Let's
revert the change until I get proper time to figure out why it's broken.
2024-06-26 20:36:46 +02:00
72cf2bdb87 Audit uses of IsRunning and GetState
Some pieces of code are calling IsRunning because there's some
particular action that only makes sense when emulation is running, for
instance showing the state of the emulated CPU. IsRunning is appropriate
to use for this. Then there are pieces of code that are calling
IsRunning because there's some particular thing they must avoid doing
e.g. when the CPU thread is running or IOS is running. IsRunning isn't
quite appropriate for this. Such code should also be checking for the
states Starting and Stopping. Keep in mind that:

* When the state is Starting, the state can asynchronously change to
  Running at any time.
* When we try to stop the core, the state gets set to Stopping before we
  take any action to actually stop things.

This commit adds a new method Core::IsUninitialized, and changes all
callers of IsRunning and GetState that look to me like they should be
changed.
2024-06-21 20:52:55 +02:00
c23562b7b5 Merge pull request #12695 from mitaclaw/core-global-system-4
Core::IsRunning: Avoid Global System Accessor
2024-05-04 05:15:35 +02:00
0df401b164 Core::IsRunning: Avoid Global System Accessor 2024-05-01 08:54:17 -07:00
0397339ab1 DolphinQt: Properly Delete (Some) Widgets
This is not every memory leak, just the ones that were obvious.
2024-04-30 11:17:28 -07:00
Mai
d85cb749c0 Merge pull request #11382 from skyfloogle/traversal-fix-2
Traversal: Use low TTL for probe packet
2023-11-30 18:03:50 -05:00
715ba3cd0f NetPlaySetupDialog: Fix spacing in Connect tab
Add a spacer between the alert text and Connect button to prevent the
alert text from migrating down with larger window heights.
2023-11-25 13:14:45 -08:00
43e69d3e6a DolphinQt: Remove unnecessary qOverloads
qOverload is used to disambiguate pointers to overloaded functions, but
most of the usages in the code base were with non-overloaded functions.
2023-11-04 14:14:14 -07:00
e2fb8fab2f DolphinQt: Set window decorations for all top-level QWidgets. 2023-08-12 16:54:54 +02:00
5c1c22bab9 Traversal: Notify user of TTL to be used 2023-05-20 17:15:10 +02:00
30e7ab94fa Common/TraversalProto: Move interface into Common namespace
Gets the types out of the global namespace.
2023-04-24 08:53:14 -04:00
27f38c6c8f Common/TraversalClient: Move interface into Common namespace
Gets the interface out of the global namespace.
2023-04-24 08:28:25 -04:00
abfc75f362 Cleanup headers 2023-01-31 19:41:24 +13:00
f9fe25291d Remove most uses of StringFromFormat in favor of fmt 2022-10-12 16:50:47 -07:00
571e300e9e Merge pull request #11047 from AdmiralCurtiss/netplay-save-options-rework
Netplay: Simplify save data options.
2022-09-24 20:26:05 +02:00
b0ac5ac6af Merge pull request #10949 from Zopolis4/reprecated
Resolve C++20 deprecation warnings
2022-09-22 21:56:24 -04:00
0d095b4d9b Netplay: Simplify save data options. 2022-09-20 01:37:32 +02:00
bec4850fc3 Netplay: Rename variable names in NetSettings to match style guide. 2022-09-19 01:25:46 +02:00
e54818e60d Resolve "implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20" warning 2022-08-08 11:25:19 +10:00
403f3693da NetPlay: use sha1 instead of md5 2022-08-02 22:25:05 -07:00
c7ce035a7f NetPlay: rename md5 -> game digest 2022-08-02 22:25:05 -07:00
2341ff00ab NetPlay: Make messages about non-matching games clearer 2022-05-24 23:20:45 -07:00
b379df360a Merge pull request #10497 from martinD2014/master
Change the highlighted button on each window
2022-03-27 16:05:23 +02:00
c058c8e1a6 NetPlayDialog: Display external IP/Port as seen by the traversal server when it's used. 2022-03-15 01:56:16 -05:00
a4d031cfda Add NonDefaultQPushButton to set autoDefault of buttons to false 2022-03-08 08:51:29 +01:00
83c5446d85 Fix static initialisation order fiasco issue for Version variables
Fixes a crash that could occur if the static constructor function for
the MainSettings.cpp TU happened to run before the variables in
Common/Version.cpp are initialised. (This is known as the static
initialisation order fiasco.)

By using wrapper functions, those variables are now guaranteed to be
constructed on first use.
2022-01-14 00:04:22 +01:00
b928900f6e Core/WiiRoot: Handle the combination of NetPlay and savegame redirects. 2021-12-14 06:15:37 +01:00
6350c93ae1 NetPlay: Pass Wii FS sync data directly to game boot logic instead of indirectly through globals. 2021-11-22 01:33:46 +01:00
7b776f3769 NetPlay: Refactor game boot code path to allow passing BootSessionData through it. 2021-11-22 00:52:15 +01:00
3ce5caf887 NetPlay: Split save and SD card write settings
This actually eliminates any setting pertaining to SD cards from the
NetPlay dialog, as it would effectively just be a duplicate of the
setting in the Wii pane, potentially causing confusion.

This also enables save data writing by default, as this is probably
what most players want, and should avoid them losing hours of progress
because they forgot to tick a checkbox.
2021-07-22 01:16:20 -04:00
45f2461a53 NetPlay: GBA Support 2021-07-13 16:43:59 +02:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
171aad50cc NetPlay: Move NetSettings initialization to backend
It doesn't really belong in frontend code, and this change will make it
easier to eventually support NetPlay on other UI frameworks.
2021-05-19 06:34:24 -04:00
dad309d365 Disable ICache emulation for some games
Specifically, 'Scooby-Doo! Mystery Mayhem', 'Scooby-Doo! Unmasked', 'Ed, Edd n Eddy: The Mis-Edventures', and the Wii version of 'Happy Feet'.

The JIT cache causes problems with emulated icache invalidation in these games, resulting in areas failing to load.
2021-04-06 12:44:10 -07:00
a9862b5395 NetPlay: Sync more settings 2021-03-07 14:22:53 +01:00
28cd6f6520 Merge pull request #9440 from lioncash/qt6
DolphinQt: Qt 6.0 forward-compatibility changes
2021-01-27 19:28:43 +01:00
2021175809 TraversalClient: Convert state enum into an enum class
Prevents implicit conversions and prevents identifiers from polluting
the class scope.
2021-01-20 12:24:03 -05:00
765a1b3c09 DolphinQt: Explicitly include <QActionGroup> where applicable
An indirect inclusion scenario that breaks on Qt 6.0
2021-01-13 04:46:11 -05:00
b285991b88 Turn Config::Info into a class with getters 2020-12-11 19:54:16 +01:00
ffbf3d71f0 Frontends: Migrate logs over to fmt 2020-11-25 21:19:08 -05:00
9efc81ae98 Fix variable shadowing warnings 2020-11-21 02:08:09 +01:00
5b757024c4 GameListModel instance ownership transferred back to the GameList instance. The GameListModel instance will be passed as a constructor parameter where needed. 2020-10-01 22:09:45 +02:00
e7e5175606 Merge pull request #8861 from JosJuice/netplay-hash
Make netplay's "same game" check more robust
2020-09-06 17:14:08 -04:00
ddeb2236ae Removed RunOnObject() usage to prevent deadlock on exiting the NetPlay Session Browser dialog. 2020-08-16 12:32:50 +01:00
eee1589aa3 Restoring NetPlay Session Browser dialog's settings before connecting widgets, to prevent multiple refresh requests on change. 2020-08-15 22:29:23 +01:00