summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/MainWindow.cpp
AgeCommit message (Collapse)Author
2024-11-02Merge pull request #13151 from mitaclaw/core-global-system-6Tilka
MainWindow: Avoid Global System Accessor
2024-10-28Merge pull request #12954 from LillyJadeKatrin/retroachievements-confirmJMC47
Achievements Confirmation Dialogs
2024-10-24MainWindow: Avoid Global System Accessormitaclaw
2024-10-19DolphinQt: JIT Widget Refreshmitaclaw
Fulfilling a certain six-year-old todo.
2024-10-12Merge pull request #13076 from robxnano/dbus-inhibitTilka
Linux: Use D-Bus to inhibit screensaver
2024-10-11Merge pull request #13075 from robxnano/qt-color-schemeTilka
Remove unneeded Win32 code for color scheme
2024-10-04Partially revert "Revert "Audit uses of IsRunning and GetState""JosJuice
This reverts the revert commit bc67fc97c39628c76a4dbca411b0e8a9bfaf726a, except for the changes in BaseConfigLoader.cpp, which caused the bug that made us revert 72cf2bdb87f09deff22e1085de3290126aa4ad05. 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-03Turn off debug mode if hardcore is active on emulator startLillyJadeKatrin
Found this bug while testing; if I manually edit the config files while Dolphin is closed I was able to get debug and hardcore on at the same time, this resolves that.
2024-09-27linux: Use D-Bus to inhibit screensaverrobxnano
2024-09-27DolphinQt: Remove unneeded Win32 coderobxnano
Dolphin already uses QStyleHints::colorScheme to detect dark mode, so this code is now redundant.
2024-09-20DolphinQt: A Ubiquitous Signal For When Breakpoints Changemitaclaw
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.
2024-08-27MainWindow: Prevent Confirm On Stop dialog from being hiddenDentomologist
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.
2024-07-28i18n: Add comments and improve source stringsJosJuice
Most of these changes are to improve consistency in capitalization.
2024-07-06Add Open Achievements HotkeyLillyJadeKatrin
Adds a hotkey to pause emulation and bring up the Achievements dialog.
2024-07-04Merge pull request #12888 from TryTwo/Fix_Window_TitlebarAdmiral H. Curtiss
MainWindow: Bugfix. Windows Dark mode titlebar not being set.
2024-06-26Revert "Audit uses of IsRunning and GetState"JosJuice
This reverts commit 72cf2bdb87f09deff22e1085de3290126aa4ad05. 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-23MainWindow: Remove Show() and redistribute its logic to other places.TryTwo
bugfix: SetQWidgetWindowDecorations(this); not called before show() for Windows darkmode titlebars. The actual call to (QWidget) show() needed to come sooner. Show() was originally left alone, but with other checks needing to move with (QWidget) show(), this function became less useful. Show() was originally created to fix the render widget appearing behind the main window, but that appears to work fine in this iteration.
2024-06-21Audit uses of IsRunning and GetStateJosJuice
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-21Core: Store current state in less placesJosJuice
Core::GetState reads from four different pieces of state: s_is_stopping, s_hardware_initialized, s_is_booting, and CPUManager::IsStepping. I'm keeping that last one as is for now because there's code in Dolphin that sets it directly, but we can unify the other three to make things easier to reason about. This commit also gets rid of s_is_started. This was previously used in Core::IsRunningAndStarted to ensure true wouldn't be returned until the CPU thread was started, but it wasn't used in Core::GetState, so Core::GetState would happily return State::Running after we had initialized the hardware but before we had initialized the CPU thread. As far as I know, there are no callers that have any real need to know whether the boot process is currently initializing the hardware or the CPU thread. Perhaps once upon a time there was a desire to make the apploader debuggable, but a long time has passed without anyone stepping up to implement it, and the way CBoot::RunApploader is implemented makes it rather difficult. So this commit makes all the functions in Core.cpp consider the core to still be starting until the CPU thread is started.
2024-06-08MainWindow: Don't save UI geometry in batch mode. Batch mode was erasing ↵TryTwo
the UI geometry for the sessions where batch mode is off. Render widget is still saved.
2024-06-04MainWindow: Check for batch mode before show().TryTwo
2024-05-22MainWindow: Initialize geometries before calling GetWindowSystemInfo.TryTwo
On Windows: wsi.render_window being set will set/save the initial geometry, which will cause sizing bugs until it's set again by the user resizing/repositioning.
2024-05-03Core::SetState: Avoid Global System Accessormitaclaw
2024-05-01Core::IsRunning: Avoid Global System Accessormitaclaw
2024-05-01Refactor AchievementsWindow::UpdateData to take a partial update parameterLillyJadeKatrin
UpdateData in AchievementsWindow now only updates the components being requested, massively improving the window's performance. The parameter is UpdatedItems in AchievementManager, which tracks which portions of the system have been updated for every update callback.
2024-04-08Core::GetState: Avoid Global System Accessormitaclaw
2024-03-31Merge pull request #12645 from mitaclaw/ppc-symbols-signalAdmiral H. Curtiss
DolphinQt: A Ubiquitous Signal For When Symbols Change
2024-03-28DolphinQt: A Ubiquitous Signal For When Symbols Changemitaclaw
There were three distinct mechanisms for signaling symbol changes in DolphinQt: `Host::NotifyMapLoaded`, `MenuBar::NotifySymbolsUpdated`, and `CodeViewWidget::SymbolsChanged`. The behavior of these signals has been consolidated into the new `Host::PPCSymbolsUpdated` signal, which can be emitted from anywhere in DolphinQt to properly update symbols everywhere in DolphinQt.
2024-03-23Core: Remove RunAsCPUThreadmitaclaw
It's a fine function, but CPUThreadGuard is more vogue. Also, its potential for being confused with RunOnCPUThread will not be missed.
2024-03-22Merge pull request #12606 from mitaclaw/state-global-systemAdmiral H. Curtiss
State: Avoid Global System Accessor
2024-03-18Core: Avoid (Some) Global System Accessormitaclaw
2024-03-17Merge pull request #12616 from mitaclaw/dvd-interface-cpu-thread-guardAdmiral H. Curtiss
DVDInterface: Modernize With CPUThreadGuard
2024-03-11CheatsManager/CheatSearchWidget: Avoid Global System Accessormitaclaw
OnResetClicked and GenerateARCode appear to have been using the CPUThreadGuard in error.
2024-03-12Merge pull request #12602 from mitaclaw/qt-memory-global-systemAdmiral H. Curtiss
Memory(View)Widget: Avoid Global System Accessor
2024-03-08DVDInterface: Modernize With CPUThreadGuardmitaclaw
2024-03-01BootManager: Avoid Global System Accessormitaclaw
2024-03-01State: Avoid Global System Accessormitaclaw
2024-03-01Memory(View)Widget: Avoid Global System Accessormitaclaw
2024-02-05Retain Save State FolderLillyJadeKatrin
Adds a setting field under the hood to retain which folder the player last saved/loaded a state to/from, so that the dialog box to select a state to save/load reopens at that folder.
2024-01-31Migrate SConfig::bWii to System.Admiral H. Curtiss
2024-01-15Core/Movie: Refactor to class, move to System.Admiral H. Curtiss
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
2024-01-12FifoRecorder: Move instance to System.Admiral H. Curtiss
2024-01-05FifoPlayer: Move instance to System.Admiral H. Curtiss
2023-12-16Merge pull request #11497 from vyuuui/debugger_assembler_uiTilka
Built-in assembler for debugger interface
2023-12-13Parser and Assembler implementationsvyuuui
2023-12-11AchievementManager: Make GetInstance() return a referenceLioncash
The internal static member will always have a valid lifetime. Makes this consistent with other instance based objects in our code.
2023-12-02Disable cheats in hardcore modeLillyJadeKatrin
RetroAchievements does not allow cheats such as Action Replay or Gecko in hardcore mode, for fairness.
2023-12-02Disable Freelook in hardcore modeLillyJadeKatrin
The player getting a better view of their surroundings than the game would normally allow could possibly give the player an advantage over the original hardware, so Freelook is disabled in hardcore mode. To do this, I disable the config flag for Freelook when it is accessed, to make sure that it is disabled whether it was enabled before or after hardcore mode was enabled.
2023-12-02Disable memory patches in hardcore modeLillyJadeKatrin
Memory patches would be an easy way to manipulate the memory needed to calculate achievement logic, so they must be disabled. Riivolution patches that do not affect memory are allowed, as they will be hashed with the game file.
2023-12-02Added Hardcore Warning WidgetLillyJadeKatrin
This widget will be used in several places to notify the player that a feature has been disabled because hardcore mode is on. It includes a button to open the Achievement Settings so that Hardcore Mode may be turned off. Also included is the framework required to open AchievementsWindow specifically on the Settings tab.