This is a minor improvement to add line numbers to the LOG_VULKAN_ERROR
define. Basically error logs for Vulkan will now look like:
```
// This
25:03:347 VideoBackends/Vulkan/VulkanLoader.cpp:247 E[Video]: (WaitForCommandBufferCompletion:278) vkWaitForFences failed: (2: VK_TIMEOUT)
// Instead of
15:45:154 VideoBackends/Vulkan/VulkanLoader.cpp:247 E[Video]: (WaitForCommandBufferCompletion) vkWaitForFences failed: (2: VK_TIMEOUT)
```
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.
A vector of length 0 can have a null data pointer, which causes UB when
passed to memcpy, so only copy when we actually have data to copy. This
caused crashes in certain cases when compiling Dolphin with Clang and
LTO enabled.
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.
These patches were added in bde9a459cd
and enabled by default in 36ecfdd6b5.
They allowed the game to run in Dolphin but disabled dynamic shadows.
The game adds 4 to the start address of otherwise valid display lists
for no obvious reason. Now that Dolphin forces 32-byte alignment these
patches are no longer needed.
Input/output tracking is intended to speed up incremental builds by
skipping a target when it doesn't need to be built. However, this seems
to be unreliable for UnitTests' AfterBuild target. Let's remove it.
It's still the case that UnitTests' AfterBuild target will be skipped if
UnitTests doesn't need to be rebuilt. (Note that UnitTests always needs
to be rebuilt if SCMRevGen changed.)
I haven't seen these problems with DolphinQt's rather similar
input/output tracking. This may be because DolphinQt's one also has the
exe file as an input/output.
`std::bit_cast` participates in overload resolution only if `sizeof(To) == sizeof(From)` and both `To` and `From` are *TriviallyCopyable* types, so the static assertions here can be removed. `[[nodiscard]]` was added as well.
Like the previous commit, but for UnitTests. This time all operating
systems were affected.
I also made UnitTests.vcxproj use the same way of copying as
DolphinQt.vcxproj, just for consistency.
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.
Update the checkmarked slot in the Select State Slot menu when the
Increase Selected State Slot or Decrease Selected State Slot hotkeys are
pressed.
The actual selected save slot was being changed correctly before this
commit; this just fixes the menu checkmark.
The biquad filter is used in all Pikmin games for cursor sound effects
in the main menu, although the difference is subtle.
The low-pass filter is used at least by Pikmin 2 Wii during the
spaceship crash in the intro and fixes the missing "puff" sound effects
whenever there is black smoke coming out of the engine.
With this change, a different message is displayed if starting a game with RetroAchievements fails due to the Dolphin version being blocked as opposed to failing because the game hash is unsupported.
This compile definition was removed in 68cbd2640d because it was complicated by changes in 50dc0ffbce. Thus, the LLVM disassembler would never be used in UICommon's Disassembler class.
In a race condition, the core could shut down between the `JitInterface::GetCore` nullptr check and the `JitInterface::JitBlockLogDump` call which constructs a `CPUThreadGuard`. In this scenario, nothing horrible happens—`JitBlockLogDump` also checks for a nullptr—but it would be a failure to display the correct feedback to the user.
To fix the crash in input device sensor handling, we should look up
Sensors using structural equality. Unfortunately, Sensor.equals
implements referential equality, and HashMap doesn't let us provide a
custom comparator. Because the number of sensors is relatively small,
and because we have a reason to keep a sorted list of sensors around
anyway, let's switch from HashMap to ArrayList.
`Layer::Save` only does its thing if the layer has `is_dirty == true`.
But SYSCONF could have been modified by other layers, so if the base layer wasn't made dirty by anything else, then it wouldn't be restored.
Fixes https://bugs.dolphin-emu.org/issues/13580
I tried making the new templated Interpret callback test only the relevant exceptions (EXCEPTION_DSI, EXCEPTION_PROGRAM, or both), but didn't find a significant performance boost in it. As I am learning, the biggest bottleneck is the number of callbacks emitted, not usually the actual contents of them.
WritePC is now needed far less, only for instructions that end the block. Unfortunately, WritePC still needs to update `PowerPCState::npc` to support the false path of conditional branch instructions. Both drawbacks should be smoothed over by optimized cached instructions in the future.
Use QObject->deleteLater() instead of the delete operator to destroy
child widgets of the layout. This prevents crashes caused by pending
events trying to access the now-destroyed widget.