Commit Graph

81 Commits

Author SHA1 Message Date
robxnano 5e8f5afb52
DolphinQt: Remove unneeded Win32 code
Dolphin already uses QStyleHints::colorScheme to detect dark mode,
so this code is now redundant.
2024-09-27 10:41:01 +01:00
Dentomologist d9336a5de0 GeneralPane: Add BalloonTip to cheats checkbox 2024-07-29 14:00:46 -07:00
TryTwo f29fe15d77 FrameAdvance: Fix continuous frame advancing while the debug UI is open. Blocks signals from being spammed to update the UI. 2024-06-26 16:19:03 -07:00
Tillmann Karras 0f659508ea DolphinQt: fix two -Wunused-lambda-capture warnings
Also clean up signals a bit.
2024-06-23 00:13:58 +01:00
JosJuice 22aa88109f Use a stub AchivementManager when USE_RETRO_ACHIEVEMENTS isn't defined
This lets us reduce the number of USE_RETRO_ACHIEVEMENTS ifdefs in the
code base, reducing visual clutter. In particular, needing an ifdef for
each call to IsHardcodeModeActive was annoying to me. This also reduces
the risk that someone writes code that accidentally fails to compile
with USE_RETRO_ACHIEVEMENTS disabled.

We could cut down on ifdefs even further by making HardcodeWarningWidget
always exist, but that would result in non-trivial code ending up in the
binary even with USE_RETRO_ACHIEVEMENTS disabled, so I'm leaving it out
of this PR. It's not a lot of code though, so I might end up revisiting
it at some point.
2024-06-06 08:26:20 +02:00
Dentomologist 33b64d6c91
InterfacePane: Add BalloonTip to cursor visible radio buttons 2024-05-31 19:09:00 +02:00
Dentomologist a581fa2bfa
InterfacePane: Add BalloonTip to lock mouse checkbox 2024-05-31 19:07:33 +02:00
Dentomologist 266bbeefc8
InterfacePane: Add BalloonTip to top window checkbox 2024-05-31 18:52:22 +02:00
Dentomologist 55aaa323ec
InterfacePane: Add BalloonTip to theme combobox 2024-05-31 18:52:13 +02:00
LillyJadeKatrin ad969dfc0d Disabled Hardcore Mode when Achievements disabled
Bugfix for hardcore-disabled items being disabled when hardcore was true but achievement integration was false, which should mean hardcore is effectively disabled. Now everything checks the IsHardcoreModeActive method in AchievementManager which processes the setting AND the game state to determine if hardcore mode is actually active.
2024-05-02 04:44:52 -04:00
Tilka 773ffd04b8
Merge pull request #11497 from vyuuui/debugger_assembler_ui
Built-in assembler for debugger interface
2023-12-16 21:15:31 +00:00
vyuuui 38c15df464 Parser and Assembler implementations 2023-12-13 05:32:20 -08:00
LillyJadeKatrin cb2fa9a1f2 Disable Debug Mode in hardcore mode
Debug Mode gives players direct read and write access to memory, which could be used to completely manipulate RetroAchievements logic and therefore is not allowed in hardcore mode.
2023-12-02 16:41:16 -05:00
Admiral H. Curtiss 8f55c28472
DolphinQt/Settings: Add option to force the light or dark style on Windows. 2023-11-05 12:59:32 +01:00
Admiral H. Curtiss 6d585b6eb6
DolphinQt/Settings: Split setting of the user style into two functions.
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-11-05 12:58:11 +01:00
Admiral H. Curtiss 24012cfc7f
DolphinQt: Adjust panel-specific colors and syntax highlighting for dark theme. 2023-08-12 19:43:12 +02:00
Admiral H. Curtiss d725aaa5bc
DolphinQt: Set the application palette to a matching one when the Windows dark theme is in use. 2023-08-12 16:54:54 +02:00
Admiral H. Curtiss 250d5f55de
DolphinQt: Switch dark/light theme when Windows theme changes. 2023-08-12 16:54:54 +02:00
Admiral H. Curtiss adbe56ce15
DolphinQt: Auto-load embedded dark theme on Windows if the user uses a system-wide dark theme. 2023-08-12 16:54:53 +02:00
Admiral H. Curtiss 5d33f2abd1
DolphinQt: On Windows, detect whether the system is using a dark theme.
Co-authored-by: FearlessTobi <thm.frey@gmail.com>
2023-08-12 16:54:53 +02:00
Admiral H. Curtiss b3c9f49cbe
Core: Assert that only the Host thread may call PauseAndLock(). 2023-06-02 18:51:43 +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
Scott Mansell abfc75f362 Cleanup headers 2023-01-31 19:41:24 +13:00
Admiral H. Curtiss 1c63349984
AudioCommon: Pass Core::System to AudioCommon functions. 2022-11-06 02:13:58 +01:00
iwubcode 8aef0015fd DolphinQt: add warning if graphics mods are not enabled 2022-06-27 18:28:28 -05:00
Shawn Hoffman 27dd2c4aa4 qt: unregister Settings' DevicesChanged callback during shutdown
fixes a crash on close
2022-06-02 23:32:21 -07:00
Dentomologist 059cd5f6e1 Windows: Remove unused Qt 5 code and references 2022-05-25 17:51:17 -07:00
Shawn Hoffman 5d459380d1 qt/win: remove hack for tab bar scroll buttons 2022-05-09 01:45:42 -07:00
Admiral H. Curtiss 1ad7aac008
Qt: Set font size for default debug font. 2022-03-31 05:28:39 +02:00
JosJuice 90c576e075 Use config changed callback to detect SD insertion/ejection
This saves the GUI from having to manually call SDIO_EventNotify.
With that out of the way, we can let users change the
"Insert SD Card" setting on Android while a game is running.
2022-02-20 10:55:55 +01:00
Admiral H. Curtiss b2da738c81
Config: Port WiiKeyboard setting to new config system. 2022-01-06 16:13:57 +01:00
Admiral H. Curtiss f19cf1753b
Config: Port WiiSDCard setting to new config system. 2022-01-06 16:13:56 +01:00
Admiral H. Curtiss d590aa88a4
Config: Port remaining General settings to new config system. 2022-01-01 19:02:45 +01:00
Admiral H. Curtiss d6331c1e71
Config: Port remaining Interface settings to new config system. 2021-12-31 17:40:04 +01:00
Admiral H. Curtiss 96fa0919be
Config: Port AutoUpdate settings to new config system. 2021-12-27 21:19:28 +01:00
Filoppi 1badceb455 ControllerInterface: fix UpdateReferences() deadlock
Removed useless locks to DeviceContainer::m_devices_mutex, as they were all already protected by m_devices_population_mutex.
We have no interest in blocking other threads that were potentially reading devices at the same time so this seems fine.
This simplifies the code, and I've adjusted a few comments which mentioned possible deadlock that should now be totally gone.

The deadlock could have happen if a thread directly called EmulatedController::UpdateReferences(), while another another thread also reached EmulatedController::UpdateReferences() within a call to ControllerInterface::UpdateDevices(), as the mentioned function locked both the DeviceContainer::m_devices_mutex and s_get_state_mutex at the same time.

The deadlock was frequent on game emulation startup on Android, due to the UpdateReferences() call in InputConfig::LoadConfig() and the UI thread triggering calls to ControllerInterface::UpdateDevices().
It could also have happened on Desktop if a user pressed "Refresh Devices" manually in the UI while the input config was loading.

Also brought some UpdateReferences() comments and thread safety fixes from https://github.com/dolphin-emu/dolphin/pull/9489
2021-11-20 16:54:36 +02:00
sowens99 8ea6bef98f Port Main.DSP to MainSettings
While trying to work on adding audiodump support for CLI, I was alerted that it was important to first try moving the DSP configs to the new config before continuing, as that makes it substantially easier to write clean code to add such a feature.

This commit aims to allow for Dolphin to only rely on the new config for DSP-related settings.
2021-10-15 23:24:46 -04:00
sowens99 2aa400e72f Add option for Never Hide Mouse Cursor
Instead of having a single GUI checkbox for "Always Hide Mouse Cursor",
I have instead opted to use radio buttons so the user can swap between
different states of mouse visibility. "Movement" is the default
behavior, "Never" will hide the mouse cursor the entire time the game is
running, and "Always" will keep the mouse cursor always visible.
2021-10-12 21:04:27 -04:00
Léo Lam 32c7524f4d
Merge pull request #10021 from Dentomologist/make_windows_tabbar_scroll_buttons_opaque
DolphinQt: Make Windows tab bar scroll buttons opaque
2021-08-31 19:18:03 +02:00
Dentomologist 1fa1e7135c DolphinQt: Make Windows tab bar scroll buttons opaque 2021-08-31 08:33:00 -07:00
JosJuice fa0525f826 Port Enable Cheats to the new config system 2021-08-11 18:07:43 +02:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
JosJuice a09d9cf608
Merge pull request #9606 from Filoppi/patch-14
Qt: avoid queuing ConfigChanged() more than once
2021-06-11 18:59:39 +02:00
Filoppi 83ea16f402 Qt: Fix IOWindow keeping a shared ptr to devices even after them being removed by the ControllerInterface
this prevented some devices from being recreated correctly, as they were exclusive (e.g. DInput Joysticks)

This is achieved by calling Settings::ReleaseDevices(), which releases all the UI devices shared ptrs.
If we are the host (Qt) thread, DevicesChanged() is now called in line, to avoid devices being hanged onto by the UI.
For this, I had to add a method to check whether we are the Host Thread to Qt.

Avoid calling ControllerInterface::RefreshDevices() from the CPU thread if the emulation is running
and we manually refresh devices from Qt, as that is not necessary anymore.

Refactored the way IOWindow lists devices to make it clearer and hold onto disconnected devices.
There were so many issues with the previous code:
-Devices changes would not be reflected until the window was re-opened
-If there was no default device, it would fail to select the device at index 0
-It could have crashed if we had 0 devices
-The default device was not highlighted as such
2021-06-07 11:48:30 +03:00
Filoppi 3c7c2dfaa1 Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
Filippo Tarpini e6057c5f62 Qt: avoid queuing ConfigChanged() more than once 2021-05-20 00:30:14 +03:00
JMC47 678e035126
Merge pull request #9678 from Filoppi/tooltips_style
Make all Qt ToolTips look similar to BalloonTips
2021-05-17 16:40:49 -04:00
Filoppi 818672b585 Fix FPS counter and Game Window speed % breaking on pause/unpause
-Add pause state to FPSCounter.
-Add ability to have more than one "OnStateChanged" callback in core.
-Add GetActualEmulationSpeed() to Core. Returns 1 by default. It's used by my input PRs.
2021-05-06 01:10:04 +03:00
Filoppi 4f53adc331 Qt: make all tooltips look similar to balloon tips (and share parts of their code) 2021-04-28 21:20:39 +03:00
Vincent Cunningham db5aec019c
Add Fallback Region to configuration menu
Fallback Region
A user-selected fallback to use instead of the default PAL

This is used for unknown region or region free titles to give them
the ability to force region to use. This replaces the current fallback region
of PAL. This can be useful if a user is trying to play a region free
tilte that is originally NTSC and expects to be run at NTSC speeds. This
may be done when a user attempts to dump a WAD of their own without
understanding the settings they have chosen, or could be an intentional
decision by a developer of a ROM hack that can be injected into a
Virtual Console WAD.

Remove using System Menu region being checked in GetFallbackRegion

Use DiscIO::Region instead of std::String for fallback

Add explanation text for Fallback Region
2020-11-28 15:40:21 -05:00