Commit Graph

99 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
mitaclaw 0df401b164 Core::IsRunning: Avoid Global System Accessor 2024-05-01 08:54:17 -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 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
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 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
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
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
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
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
Techjar 52e0294166 Add option to disallow SD card writes 2020-05-28 15:11:37 -04:00
Lioncash 19115c84dd DolphinQt: Use qOverload where applicable
Provides the same behvaior, but in a much more concise manner.
2020-04-28 16:54:19 +02:00
JosJuice c6ee767851 DolphinQt: Run tasks that use progress dialogs on separate threads 2020-04-03 12:53:38 +02:00
Jordan Woyak b9f34bc822 DolphinQt: setTabKeyNavigation(false) on QTableWidget and QTableView. 2020-02-06 20:48:45 -06:00
Techjar a3d8a8be06 NetPlay: Remove 'reduce polling rate' option
With the SI poll line count fixed, pretty much all games are polling
twice per frame anyways, making this option superfluous. Since it's a
bit of a gross hack and makes DTMs incompatible with console, let's
just bin it.
2019-08-26 02:11:49 -04:00
Anthony 5f38386575
Merge pull request #8222 from JosJuice/allow-mismatched-region-settings
Replace "Override Language on NTSC Games" with "Allow Mismatched Region Settings"
2019-08-21 09:00:06 -07:00
JosJuice 561a4cfcce Replace "Override Language on NTSC Games" with "Allow Mismatched Region Settings"
This new setting is like Override Language on NTSC Games, except
instead of only applying to the GameCube language setting,
it also applies to the Wii language setting.

Fixes https://bugs.dolphin-emu.org/issues/11299
2019-08-09 17:33:05 +02:00
Brandon Rothweiler fdfa14d9cc Show a message in netplay chat when a player joins or leaves 2019-07-30 20:14:51 -07:00
Techjar b0b4b69d6e Qt/NetPlayDialog: Change network mode options to radio buttons
This changes the Host Input Authority and Golf Mode checkboxes into a
set of radio buttons, consisting of Fair Input Delay, Host Input
Authority, and Golf Mode. This represents the 3 network modes we have.

Although Golf Mode is just an extension of Host Input Authority, it's
more logical to the user to present it as a separate option, rather
than enabling the Golf Mode checkbox only when Host Input Authority is
enabled. This also eliminates the need to first enable Host Input
Authority before Golf Mode can be enabled.

This also adds tooltips to provide brief descriptions of the options,
as well as reintroducing tooltips that were previously removed.
2019-05-31 02:33:41 -04:00
Techjar 199486ffb6 Qt/NetPlayDialog: Move settings loading into LoadSettings 2019-05-30 18:07:03 -04:00
Techjar 1dd8263375 Qt/NetPlayDialog: Fix checksum menu being visible for everyone
The wrong function was used to attempt to hide the menu. Non-hosts will
segfault upon trying to use it as they don't have a server instance.
2019-05-04 01:54:57 -04:00
spycrab f7dcd191e3 Qt/NetPlayDialog: Move MD5 button into menubar 2019-04-23 22:37:22 +02:00