In StringUtil.h, the lambdas wrapping `Common::ToLower(char)` and `Common::ToUpper(char)` were only necessary due to the function names being overloaded.
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.
Remove the PopulateBackendInfoFromUI function, which had a single caller
(GraphicsWindow::OnBackendChanged) and checked that the core wasn't
running or starting before calling PopulateBackendInfo.
Move the core state check into PopulateBackendInfo and have
OnBackendChanged call that instead. This guarantees the check is
performed by all callers of PopulateBackendInfo, preventing
potential reintroduction of the crash fixed in 3d4ae63f if another call
to PopulateBackendInfo is added.
As of the previous commit the only other caller of PopulateBackendInfo
is Core::Init shortly before s_state is set to Starting, so it will
always pass the check and so maintain its current behavior.
Before, Dolphin would randomly crash when updating the cheat search when automatic refresh was enabled. (Having a large number of addresses listed, e.g. by starting with an "any value" search, may contribute). The crash was due to QTableWidget::item returning nullptr in RefreshGUICurrentValues, presumably due to the table being resized on the UI thread while the emulated CPU thread was updating the values. I've fixed this by pausing the CPU thread for the entirety of OnNextScanClicked; this eliminated crashes in my testing.
There were three distinct mechanisms for signaling breakpoint changes in DolphinQt, and the wiring had room for improvement. The behavior of these signals has been consolidated into the new `Host::PPCBreakpointsChanged` signal, which can be emitted from anywhere in DolphinQt to properly update breakpoints everywhere in DolphinQt.
This improves a few things:
- For the `CodeViewWidget` and `MemoryViewWidget`, signals no longer need to propagate through the `CodeWidget` and `MemoryWidget` (respectively) to reach their destination (incoming or outgoing).
- For the `BreakpointWidget`, by self-triggering from its own signal, it no longer must manually call `Update()` after all of the emission sites.
- For the `BranchWatchDialog`, it now has one less thing it must go through the `CodeWidget` for, which is a plus.
If texture dumping is enabled, notify the user on emulation startup
using an On Screen Display message.
Also notify the user when texture dumping is toggled.
Addresses https://bugs.dolphin-emu.org/issues/12445.
Invert conditions, invert decrement checks, and make conditional branches unconditional. USnapshotMetadata in prior versions of Dolphin is forward-compatible with these changes (tested on x86_64).
Objects which get parented automatically by later processing now pass a nullptr to the constructor to make the intent clearer. Also fixed "true" and "false" not being translatable strings.
Set the Render Window as the parent of the Confirm On Stop confirmation
dialog when Keep Window On Top is enabled, ensuring it will always be
visible.
Previously, when Confirm On Stop and Keep Window On Top were both
enabled the Confirm On Stop dialog could be hidden by the render window
in the following situations:
* Clicking Stop in the Main Window
* Clicking the Main Window's close button
* Pressing the Stop hotkey while in FullScreen mode
This was particularly troublesome because the confirm dialog is modal,
preventing the user from moving the render window out of the way if it
was obscuring the dialog.
Fixes https://bugs.dolphin-emu.org/issues/13247.
Allow connecting or disconnecting multiple Wii Remotes simultaneously
instead of only handling the highest index whose hotkey is pressed. This
allows using a single hotkey to toggle multiple remotes.
Before the call to OnSelectionChange, m_code_edit and m_code_remove are
disabled and UpdateList calls m_code_list->clear(), thereby deselecting
any selected items.
When no items are selected, OnSelectionChange disables m_code_edit and
m_code_remove and then returns. Since that was already done, the call
doesn't change anything and can be removed.
Create ARCodeWidget and GeckoCodeWidget once on startup rather than
every time a game is launched or shutdown.
In addition to losing focus on the tab (since the previous widget and
tab no longer existed), the behavior prior to this commit could cause a
crash if the user initiated a game shutdown and then opened a code edit
window since the AR/GeckoCodeWidget would get deleted in the meantime.
Also some minor refactoring of nearby/related code:
* Make non-obvious variable types explicit instead of auto.
* Throw some consts around.
* Use setDisabled(empty) instead of setEnabled(!empty).
Changes the RetroAchievements "Log In" button's text to "To log in, stop the current emulation." when the button is disabled because an emulation session is active. This allows a user to understand why the button is disabled, and how this state can be resolved.
Previously, it could be unclear why this button was disabled without an understanding of the underlying system.
Co-Authored-By: JosJuice <josjuice@gmail.com>
The description of the Speed Limit setting currently uses a lot of
complicated terms, like "emulated time" (known to many Dolphin
developers, but in my experience not known by even advanced emulator
users) and "maximum time scale" (I have never heard it before). The
meaning of "sustainable" is also unclear in context.
This commit rewords the description to be easier to understand.
Fixes https://bugs.dolphin-emu.org/issues/13593. Before, it would attempt to
use the old shader, which did not exist for the new stereo mode. Changing the
postprocessing shader afterwards would work properly, although passive 3D only
has one option, so it was just broken without restarting Dolphin.
This also fixes the UI not updating when using one of the stereo toggle hotkeys.
For a long time now, we've had a problem where game INIs persist in
the copied Sys folder if they've been deleted from the original Sys
folder. (I still have hundreds of game INIs locally that only set
EmulationStateId, and we removed those game INIs 6 years ago. On the
buildbot, we do occasionally clear out the build directories manually,
so I'd assume it's not quite as bad there.)
This commit fixes the problem by deleting the output Sys folder before
copying the original Sys folder to the output Sys folder. This should be
a bit slower, but in my testing, the difference seems small. At least if
you have an SSD, which I really hope people have nowadays!
Operating systems other than Windows have not been touched, because:
* Android: Already explicitly deletes the output Sys folder.
* macOS: Does some magic to put the Sys folder in the app bundle, which I
will simply assume isn't affected by this problem, without testing.
* Linux: Expects the person building to manually manage the Sys folder.