summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/MainWindow.cpp
AgeCommit message (Collapse)Author
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.
2023-11-30Merge pull request #11382 from skyfloogle/traversal-fix-2Mai
Traversal: Use low TTL for probe packet
2023-11-05DolphinQt/Settings: Split setting of the user style into two functions.Admiral H. Curtiss
This makes it so that if you just want to reload the current style (eg. on program start, or in response to a system event), you don't need to know the name of the currently selected user style. It's also more consistent with the way the 'userstyle/enabled' flag works.
2023-09-28SaveStates: Fix MainWindow.m_state_slot is not restored from Qt.ini ↵Fabrice CARUSO
Emulation/StateSlot. Select slot 2 and exit & launch Dolphin again. Slot 2 is selected in the menu, but saving from selected slot saves to slot 1.
2023-09-04Rearranged RetroAchievements startup processLillyJadeKatrin
Moved AchievementManager Init further down in the MainWindow constructor; its original position was because it had an impact on the contents of the menu bar, and this is no longer the case.
2023-08-13Merge pull request #12066 from Pokechu22/main-window-right-click-menuJMC47
Disable right-click menu on main window
2023-08-12DolphinQt: Adjust panel-specific colors and syntax highlighting for dark theme.Admiral H. Curtiss
2023-08-12DolphinQt: Switch dark/light theme when Windows theme changes.Admiral H. Curtiss
2023-08-12DolphinQt: Set window decorations for all top-level QWidgets.Admiral H. Curtiss
2023-08-11Disable right-click menu on main windowPokechu22
Before, right-clicking on the toolbar would allow toggling all dock widgets, including the debugger ones even when they are disabled. (See https://doc.qt.io/qt-5/qmainwindow.html#createPopupMenu for this behavior, and https://bugs.dolphin-emu.org/issues/13306 for an example of where it caused issues.)
2023-06-08VideoCommon: Pass WindowSystemInfo to InitBackendInfoPokechu22
2023-06-01Added AchievementsWindow QDialogLillyJadeKatrin
AchievementsWindow is the dialog box that will eventually contain the settings and progress data for RetroAchievements on Dolphin. This adds the barebones dialog, and connects it to MainWindow's MenuBar.
2023-05-26Add Hotkeys for Skylanders Portal and Infinity Base Menusjnaidu360
Adds two new hotkeys to open the menus for emulated USB devices- Skylanders Portal of Power and the Infinity Base. (Hotkeys only active when game is running). Portal menu: Default is <Ctrl+P>. Infinity base: Default is <Ctrl+I>
2023-05-20Traversal: Autoconfigure TTL to use for probe packetFloogle
2023-05-01Qt: Prevent savestate load/save on empty filenamesowens99