Commit Graph

144 Commits

Author SHA1 Message Date
JosJuice 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
Alfred Wingate 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
Dr. Dystopia 618b41a459 Use 'contains' method 2024-08-14 22:18:28 +02:00
JosJuice 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
JosJuice 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
Admiral H. Curtiss 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
mitaclaw 0df401b164 Core::IsRunning: Avoid Global System Accessor 2024-05-01 08:54:17 -07:00
mitaclaw 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
Dentomologist 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
Dentomologist 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
Admiral H. Curtiss e2fb8fab2f
DolphinQt: Set window decorations for all top-level QWidgets. 2023-08-12 16:54:54 +02:00
Floogle 5c1c22bab9 Traversal: Notify user of TTL to be used 2023-05-20 17:15:10 +02:00
Lioncash 30e7ab94fa Common/TraversalProto: Move interface into Common namespace
Gets the types out of the global namespace.
2023-04-24 08:53:14 -04:00
Lioncash 27f38c6c8f Common/TraversalClient: Move interface into Common namespace
Gets the interface out of the global namespace.
2023-04-24 08:28:25 -04:00
Scott Mansell abfc75f362 Cleanup headers 2023-01-31 19:41:24 +13:00
Pokechu22 f9fe25291d Remove most uses of StringFromFormat in favor of fmt 2022-10-12 16:50:47 -07:00
Admiral H. Curtiss 571e300e9e
Merge pull request #11047 from AdmiralCurtiss/netplay-save-options-rework
Netplay: Simplify save data options.
2022-09-24 20:26:05 +02:00
JMC47 b0ac5ac6af
Merge pull request #10949 from Zopolis4/reprecated
Resolve C++20 deprecation warnings
2022-09-22 21:56:24 -04:00
Admiral H. Curtiss 0d095b4d9b
Netplay: Simplify save data options. 2022-09-20 01:37:32 +02:00
Admiral H. Curtiss bec4850fc3
Netplay: Rename variable names in NetSettings to match style guide. 2022-09-19 01:25:46 +02:00
Zopolis4 e54818e60d
Resolve "implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20" warning 2022-08-08 11:25:19 +10:00
Shawn Hoffman 403f3693da NetPlay: use sha1 instead of md5 2022-08-02 22:25:05 -07:00
Shawn Hoffman c7ce035a7f NetPlay: rename md5 -> game digest 2022-08-02 22:25:05 -07:00
Pokechu22 2341ff00ab NetPlay: Make messages about non-matching games clearer 2022-05-24 23:20:45 -07:00
Admiral H. Curtiss b379df360a
Merge pull request #10497 from martinD2014/master
Change the highlighted button on each window
2022-03-27 16:05:23 +02:00
Jordan Woyak c058c8e1a6 NetPlayDialog: Display external IP/Port as seen by the traversal server when it's used. 2022-03-15 01:56:16 -05:00
Martin a4d031cfda Add NonDefaultQPushButton to set autoDefault of buttons to false 2022-03-08 08:51:29 +01:00
Léo Lam 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
Admiral H. Curtiss b928900f6e
Core/WiiRoot: Handle the combination of NetPlay and savegame redirects. 2021-12-14 06:15:37 +01:00
Admiral H. Curtiss 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
Admiral H. Curtiss 7b776f3769
NetPlay: Refactor game boot code path to allow passing BootSessionData through it. 2021-11-22 00:52:15 +01:00
Techjar 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
Bonta 45f2461a53 NetPlay: GBA Support 2021-07-13 16:43:59 +02:00
Pierre Bourdon 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
Techjar 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
Pokechu22 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
JosJuice a9862b5395 NetPlay: Sync more settings 2021-03-07 14:22:53 +01:00
Léo Lam 28cd6f6520
Merge pull request #9440 from lioncash/qt6
DolphinQt: Qt 6.0 forward-compatibility changes
2021-01-27 19:28:43 +01:00
Lioncash 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
Lioncash 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
JosJuice b285991b88 Turn Config::Info into a class with getters 2020-12-11 19:54:16 +01:00
Lioncash ffbf3d71f0 Frontends: Migrate logs over to fmt 2020-11-25 21:19:08 -05:00
Léo Lam 9efc81ae98
Fix variable shadowing warnings 2020-11-21 02:08:09 +01:00
Christian Aguilera 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
JMC47 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
Christian Aguilera ddeb2236ae Removed RunOnObject() usage to prevent deadlock on exiting the NetPlay Session Browser dialog. 2020-08-16 12:32:50 +01:00
Christian Aguilera 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
JosJuice 5cad82137d Allow translations and custom names in GameFile::GetNetPlayName
There is no longer any major reason for why this function would
need to return the same result for all players.
2020-08-02 22:46:53 +02:00
JosJuice a41166bb37 Make netplay's "same game" check more robust
Instead of comparing the game ID, revision, disc number and name,
we can compare a hash of important parts of the disc including
all the aforementioned data but also additional data such as the
FST. The primary reason why I'm making this change is to let us
catch more desyncs before they happen, but this should also fix
https://bugs.dolphin-emu.org/issues/12115. As a bonus, the UI can
now distinguish the case where a client doesn't have the game at
all from the case where a client has the wrong version of the game.
2020-08-02 22:46:53 +02:00