Commit Graph

33818 Commits

Author SHA1 Message Date
Admiral H. Curtiss ffbbd72741
Merge pull request #11767 from AdmiralCurtiss/wii-sock-man
IOS/WiiSockMan: Move instance to IOS Kernel.
2023-04-23 20:07:34 +02:00
Admiral H. Curtiss 5df7c8833a
Merge pull request #11784 from Minty-Meeo/mgba-screen-api
GBACore.cpp: Update to revised screen size/info API
2023-04-23 16:10:51 +02:00
Admiral H. Curtiss 653be9e45d
Merge pull request #11628 from Pokechu22/gles-32-only-multisample
OGL: Only specify precision for sampler2DMSArray when it is defined
2023-04-23 16:02:15 +02:00
Admiral H. Curtiss 00e4fc4b70
Netplay: Check if save is readable before marking it for sync. 2023-04-23 15:52:38 +02:00
get c9b26e3db2 Update mGBA submodule to 8739b22fbc90fdf0b4f6612ef9c0520f0ba44a51 2023-04-23 05:26:40 -05:00
Pokechu22 8fbfee03ab
Merge pull request #11764 from Minty-Meeo/ppc-cache-extendo-ram
Do not use magic numbers for RAM sizes/masks in PPCCache
2023-04-22 12:44:34 -07:00
get 9ba26670b8 Do not use magic numbers for RAM sizes/masks in PPCCache
Memory Override + Write-Back Cache emulation = game crash
2023-04-20 19:32:35 -05:00
Admiral H. Curtiss be1f2a6852
Merge pull request #11773 from lioncash/delete
Common/TraversalClient: Use correct deleter with g_MainNetHost
2023-04-20 22:17:19 +02:00
Mai c3cc1de54e
Merge pull request #11777 from Dentomologist/move_balloontip_files
Qt/Config: Move BalloonTip files from Graphics to ToolTipControls
2023-04-20 10:45:03 -04:00
Dentomologist 4174f0063e Qt: Remove unused class GraphicsBoolEx
In older versions of Dolphin GraphicsBoolEx was used to create a pair of
radio buttons selecting one of Virtual XFB and Real XFB, but this was
removed with the introduction of Hybrid XFB in 65cd085f.

In the meantime GraphicsRadioInt was introduced to allow for Graphics
radio buttons with multiple options, so GraphicsBoolEx is now redundant.
2023-04-19 16:58:42 -07:00
Dentomologist 7a78ace608 Qt/Config: Move BalloonTip.h/cpp from Graphics to ToolTipControls
BalloonTip.h/cpp are only used from the ToolTipControls folder, so move
them there.
2023-04-19 16:46:46 -07:00
Lioncash b4cc1ade02 Common/TraversalClient: Use correct deleter with g_MainNetHost
Previously this was using the default deleter (which just calls delete
on the pointer), which is incorrect, since the ENetHost instance is
allocated through ENet's C API, so we need to use its functions to
deallocate the host instead.
2023-04-19 12:38:16 -04:00
Lioncash 07ed932a09 Common/LinearDiskCache: Move interface into Common namespace
Gets the interface out of the global namespace.
2023-04-19 09:14:39 -04:00
Admiral H. Curtiss 2a0b90807d
Merge pull request #11770 from lioncash/err
Common/CommonFuncs: Move interface into Common namespace
2023-04-19 10:38:22 +02:00
Lioncash f1ad43afaf Common/CommonFuncs: Move interface into Common namespace
Gets these functions out of the global namespace.
2023-04-18 19:23:04 -04:00
OatmealDome 8aae296d4e
Merge pull request #11759 from TellowKrinkle/MTLPerfQueryFixes
VideoBackends:Metal: Fix perf queries
2023-04-18 22:15:50 +02:00
Admiral H. Curtiss 2e7f0d002e
Merge pull request #11760 from Minty-Meeo/embracing-nullptr
Embrace nullptr over NULL and 0
2023-04-18 22:14:11 +02:00
OatmealDome 8a355dbbd7
Merge pull request #11708 from TellowKrinkle/MetalMaxPixSamplers
VideoBackends:Metal: Use max pixel samplers constant
2023-04-18 22:11:06 +02:00
Admiral H. Curtiss a239af162d
Merge pull request #11768 from Pokechu22/temporary-debug-command-line
Treat --debugger command line as a temporary setting
2023-04-18 22:05:08 +02:00
Admiral H. Curtiss 361ffd5917
Merge pull request #11752 from LillyJadeKatrin/retroachievements-activate
Retroachievements activate
2023-04-18 18:38:53 +02:00
Admiral H. Curtiss 1c1b0fee25
Merge pull request #11769 from AdmiralCurtiss/ra-no-volume
AchievementManager: Fix crash when launching non-disc game.
2023-04-18 18:38:16 +02:00
JosJuice 969318ff66
Merge pull request #11761 from lioncash/mathrev
Common/MathUtil: Move remaining utilities into MathUtil namespace
2023-04-18 18:05:12 +02:00
Admiral H. Curtiss a4e1e23c34
AchievementManager: Fix crash when launching non-disc game. 2023-04-18 11:01:11 +02:00
Pokechu22 801fa8e905 Only force-show the code widget when first enabling the debugger
Before, any call of Settings::SetDebugModeEnabled(true) would show it. This means that if the debugging UI is enabled, but the user manually closed the code widget, then toggling any option on the interface pane (such as "Pause on Focus Loss") would cause the code widget to reappear. Additionally, closing and reopening dolphin did not call SetDebugModeEnabled, so the code widget did not reappear in that case (it only appeared after touching the interface pane). This is a bit silly, so now only enabling the debugger does it.

This also somewhat resolves an inconsistency introduced by the previous commit: prior to it, --debugger would call SetDebugModeEnabled(true) and thus show the code pane; after these commits, it does not, as it acts like a config change. This is a behavior difference, but not a particularly important one.
2023-04-17 23:23:36 -07:00
Pokechu22 c0b6e9e69c Treat --debugger command line as a temporary setting
Before, Settings::SetDebugModeEnabled was used; this calls SetBaseOrCurrent() which will usually permanently change the base configuration setting for the debugger to true. Thus, the debugger would remain active even if the --debugger command line option was removed. Now, it remains active only for the current run, like other command-line options.

Note that SetBaseOrCurrent is also used by the "Show Debugging UI" option under Options -> Interface; this means that if the debugger is turned off (or off and then back on) by the user while --debugger is specified, this will be reset to whatever the base configuration had when Dolphin is closed and reopened. This behavior is consistent with the rest of the UI.

To my understanding, the --debugger option is something from 5.0 stable/DolphinWx where there was no way to toggle the debug UI in the settings (and the command-line option was the only way of enabling it). It's less useful nowadays.
2023-04-17 23:11:26 -07:00
Admiral H. Curtiss b2ee958058
IOS/WiiSockMan: Move instance to IOS Kernel. 2023-04-18 01:24:10 +02:00
Admiral H. Curtiss 37a30a5e50
IOS/WiiSockMan: Remove declaration to nonexistent DecodeError(). 2023-04-17 03:43:29 +02:00
Mai 1a2dcc53f2
Merge pull request #11742 from K0bin/document-provider-2
Android: Document Provider improvements
2023-04-16 04:21:33 -04:00
get a5d06fde4b Embrace nullptr over NULL and 0 2023-04-15 16:07:05 -05:00
Robin Kertels 57ed5320b5
Android: Fix various issues with the DocumentProvider
Fixes copying & deleting folders and copy conflict handling.
2023-04-15 20:53:01 +02:00
Lioncash 784a216927 Common/MathUtil: Move IntLog2 into MathUtil namespace
Gets this out of the global namespace.
2023-04-15 03:35:05 -04:00
Lioncash 5e0c20f8a5 Common/MathUtil: Remove MathFloatVectorSum()
This isn't used anywhere and not really a generic utility, so we can get
rid of it.

This also lets us remove MathUtil.cpp, since this was the only thing
within that file.
2023-04-15 03:25:38 -04:00
LillyJadeKatrin 31c3288fd5 Added ActivateDeactivateRichPresence to AchievementManager
RetroAchievements Rich Presence is a script that is run periodically on a game's memory to provide a detailed text description of what the player is doing. Existing Discord presence on Dolphin would update a player's Discord status to say not just that they are using Dolphin but that they are playing, for example, Sonic Adventure 2 Battle; Rich Presence would detail that the player is in City Escape with 5 lives and 142 rings.

Activating this in the runtime simply entails loading that text script, as returned by the FetchGameData API call, into the runtime, here only determined by whether rich presence is enabled in the achievement settings. Deactivating this is done via the same rcheevos method by setting the rich presence to an empty string.
2023-04-14 22:22:00 -04:00
LillyJadeKatrin 64e3a64c87 Added ActivateDeactivateLeaderboards to AchievementManager
This activates or deactivates leaderboards in the rcheevos runtime similarly to achievements. The logic is much more straightforward - all leaderboards are active together; there is nothing requiring some leaderboards to be active while others are unactive, and even a leaderboard that has been submitted to in this session is still active to be submitted to again. The only criteria are that leaderboards must be enabled in the settings, and hardcore mode must be on, the latter of which is false until a future PR.
2023-04-14 22:22:00 -04:00
LillyJadeKatrin da1de36cb9 Added LoadUnlockData and ActivateDeactivateAchievements to AchievementManager
LoadUnlockData and ActivateDeactivateAchievements are the public API components responding to the FetchUnlocks and A/DAchievement (singular) private methods.

LoadUnlockData is asynchronous and performs both a hardcore and a softcore unlock call, updating the unlock map and the active status of any achievements returned from these calls.

ActivateDeactivateAchievements calls ActivateDeactivateAchievement on every achievement ID found in m_game_data, initializing the unlock map for each ID if not already found.

Both of these are currently called in LoadGameByFilenameAsync once the game has been loaded properly. There's a lock around this, to ensure that the unlock map is initialized properly by ActivateDeactivate Achievements before FetchUnlockData makes modifications to it without stalling the async portions of FetchUnlockData.
2023-04-14 22:22:00 -04:00
LillyJadeKatrin db44e10057 Added FetchUnlockData to AchievementManager
FetchUnlockData is an API call to RetroAchievements that downloads a list of achievement IDs for a game that the user has already unlocked and published to the site. It accepts a parameter for whether or not hardcore or softcore achievements are being requested, so that must be provided as well. Once it has the requested list on hand, it updates each achievement's status in the unlock map and will activate or deactivate achievements as necessary.
2023-04-14 22:22:00 -04:00
LillyJadeKatrin 505f40cf9d Added ActivateDeactivateAchievement to AchievementManager
ActivateDeactivateAchievement is passed an Achievement ID as returned from the FetchGameData API call and determines whether to activate it, deactivate it, or leave it where it is based on its current known state and what settings are enabled.

Activating or deactivating an achievement entails calling a method provided by rcheevos that performs this on the rcheevos runtime. Activating an achievement loads its memory signature into the runtime; now the runtime will process the achievement each time the rc_runtime_do_frame function is called (this will be in a future PR) to determine when the achievement's requirements are met. Deactivating an achievement unloads it from the runtime.

The specific logic to determine whether an achievement is active operates over many fields but is documented in detail inside the function. There are multiple settings flags for which achievements are enabled (one flag for all achievements, an "unofficial" flag for enabling achievements marked as unofficial i.e. those that have logic on the site but have not yet been officially approved, and an "encore" flag that enables achievements the player has already unlocked) and this function also evaluates whether the achievement has been unlocked in hardcore mode or softcore mode (though currently every reference to the current hardcore mode state is hardcoded as false).
2023-04-14 17:15:45 -04:00
Admiral H. Curtiss e9dbb93cb5
Merge pull request #11756 from lioncash/ini
Common/IniFile: Move interface into Common namespace
2023-04-14 20:52:30 +02:00
TellowKrinkle 09c80513cd VideoBackends:Metal: Fix perf queries
Fixes an issue where perf queries could end up including counts from previous queries
2023-04-14 00:25:31 -05:00
Léo Lam ae18aa0639
Merge pull request #11687 from Minty-Meeo/warnings
Resolve GCC/Clang Warnings
2023-04-14 01:29:46 +01:00
Lioncash e4caace6bb Common/IniFile: Move interface into Common namespace
Gets this out of the global namespace and into the Common namespace
2023-04-13 10:19:28 -04:00
Lioncash f5bdfdde1a Common/UPnP: Move interface into Common namespace
Keeps these utilities consistent with the rest of most of the Common
library.
2023-04-12 14:15:58 -04:00
Minty-Meeo f29019180f Pragma diagnostic ignore [-Wregister] is no longer needed 2023-04-12 03:59:57 -05:00
Minty-Meeo 65edfb0eed Resolve [-Wunused-const-variable] 2023-04-12 03:59:57 -05:00
Minty-Meeo 244918acb8 Resolve [-Wdeprecated-declarations] 2023-04-12 03:59:57 -05:00
Minty-Meeo 528f7c90e9 Resolve [-Wtautological-constant-out-of-range-compare] 2023-04-12 03:59:57 -05:00
Minty-Meeo efd06a85d2 Resolve [-Wunused-but-set-variable] 2023-04-12 03:59:57 -05:00
Minty-Meeo 678c93589a Resolve [-Wclass-memaccess] 2023-04-12 03:59:57 -05:00
LillyJadeKatrin 8b57c4b239 Added LoadGameByFilenameAsync and CloseGame to AchievementManager
LoadGameByFilenameAsync sets up a volume reader and hashes the volume, then uses that hash to make the three consecutive API requests to resolve hash, start session and load game data.

CloseGame resets the m_is_game_loaded flag, wipes the queue, and destroys all the game data responses.
2023-04-12 03:08:47 -04:00
LillyJadeKatrin bd75ce6e6d Added FetchGameData to AchievementManager
FetchGameData is the big one - this retrieves the logic for all the achievements, leaderboards, and rich presence, and all the relevant metadata for the game.
2023-04-12 03:08:47 -04:00