diff --git a/BuildMacOSUniversalBinary.py b/BuildMacOSUniversalBinary.py old mode 100755 new mode 100644 diff --git a/Externals/MoltenVK/configure.sh b/Externals/MoltenVK/configure.sh old mode 100755 new mode 100644 diff --git a/Externals/MoltenVK/patch.sh b/Externals/MoltenVK/patch.sh old mode 100755 new mode 100644 diff --git a/Externals/fmt/CMakeLists.txt b/Externals/fmt/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/Flatpak/fill_release_node.sh b/Flatpak/fill_release_node.sh old mode 100755 new mode 100644 diff --git a/Languages/update-source-strings.sh b/Languages/update-source-strings.sh old mode 100755 new mode 100644 diff --git a/Languages/update-translated-strings.sh b/Languages/update-translated-strings.sh old mode 100755 new mode 100644 diff --git a/Source/Android/gradlew b/Source/Android/gradlew old mode 100755 new mode 100644 diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index e52fb6920001..1972c003efe5 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -22,6 +22,7 @@ #include "Core/AchievementManager.h" #include "Core/Config/MainSettings.h" #include "Core/Config/UISettings.h" +#include "Core/System.h" #include "DolphinQt/Config/ConfigControls/ConfigBool.h" #include "DolphinQt/Config/ConfigControls/ConfigChoice.h" @@ -32,6 +33,7 @@ #include "DolphinQt/QtUtils/SignalBlocking.h" #include "DolphinQt/Settings.h" +#include #include "UICommon/GameFile.h" static ConfigStringChoice* MakeLanguageComboBox() @@ -95,6 +97,10 @@ InterfacePane::InterfacePane(QWidget* parent) : QWidget(parent) connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &InterfacePane::UpdateShowDebuggingCheckbox); + connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, + &InterfacePane::OnEmulationStateChanged); + + OnEmulationStateChanged(Core::GetState(Core::System::GetInstance())); } void InterfacePane::CreateLayout() @@ -168,12 +174,15 @@ void InterfacePane::CreateUI() new ConfigBool(tr("Hotkeys Require Window Focus"), Config::MAIN_FOCUSED_HOTKEYS); m_checkbox_disable_screensaver = new ConfigBool(tr("Inhibit Screensaver During Emulation"), Config::MAIN_DISABLE_SCREENSAVER); + m_checkbox_time_tracking = + new ConfigBool(tr("Enable Play Time Tracking"), Config::MAIN_TIME_TRACKING); groupbox_layout->addWidget(m_checkbox_use_builtin_title_database); groupbox_layout->addWidget(m_checkbox_use_covers); groupbox_layout->addWidget(m_checkbox_show_debugging_ui); groupbox_layout->addWidget(m_checkbox_focused_hotkeys); groupbox_layout->addWidget(m_checkbox_disable_screensaver); + groupbox_layout->addWidget(m_checkbox_time_tracking); } void InterfacePane::CreateInGame() @@ -313,6 +322,12 @@ void InterfacePane::OnLanguageChanged() tr("You must restart Dolphin in order for the change to take effect.")); } +void InterfacePane::OnEmulationStateChanged(Core::State state) +{ + const bool running = state != Core::State::Uninitialized; + m_checkbox_time_tracking->setEnabled(!running); +} + void InterfacePane::AddDescriptions() { static constexpr char TR_TITLE_DATABASE_DESCRIPTION[] = QT_TR_NOOP( @@ -341,6 +356,10 @@ void InterfacePane::AddDescriptions() static constexpr char TR_DISABLE_SCREENSAVER_DESCRIPTION[] = QT_TR_NOOP("Disables your screensaver while running a game." "

If unsure, leave this checked."); + static constexpr char TR_TIME_TRACKING[] = QT_TR_NOOP( + "Tracks the time you spend playing games and shows it in the List View (as hours/minutes)." + "

This setting cannot be changed while emulation is active." + "

If unsure, leave this checked."); static constexpr char TR_CONFIRM_ON_STOP_DESCRIPTION[] = QT_TR_NOOP("Prompts you to confirm that you want to end emulation when you press Stop." "

If unsure, leave this checked."); @@ -394,6 +413,8 @@ void InterfacePane::AddDescriptions() m_checkbox_disable_screensaver->SetDescription(tr(TR_DISABLE_SCREENSAVER_DESCRIPTION)); + m_checkbox_time_tracking->SetDescription(tr(TR_TIME_TRACKING)); + m_checkbox_confirm_on_stop->SetDescription(tr(TR_CONFIRM_ON_STOP_DESCRIPTION)); m_checkbox_use_panic_handlers->SetDescription(tr(TR_USE_PANIC_HANDLERS_DESCRIPTION)); diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.h b/Source/Core/DolphinQt/Settings/InterfacePane.h index 90a81d2114e2..ffe1efa0872e 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.h +++ b/Source/Core/DolphinQt/Settings/InterfacePane.h @@ -13,6 +13,11 @@ class QVBoxLayout; class ToolTipCheckBox; class ToolTipComboBox; +namespace Core +{ +enum class State; +} + class InterfacePane final : public QWidget { Q_OBJECT @@ -30,6 +35,8 @@ class InterfacePane final : public QWidget void OnUserStyleChanged(); void OnLanguageChanged(); + void OnEmulationStateChanged(Core::State state); + QVBoxLayout* m_main_layout; ConfigStringChoice* m_combobox_language; @@ -42,6 +49,7 @@ class InterfacePane final : public QWidget ConfigBool* m_checkbox_focused_hotkeys; ConfigBool* m_checkbox_use_covers; ConfigBool* m_checkbox_disable_screensaver; + ConfigBool* m_checkbox_time_tracking; ConfigBool* m_checkbox_confirm_on_stop; ConfigBool* m_checkbox_use_panic_handlers; diff --git a/Source/DSPSpy/util/createtest.pl b/Source/DSPSpy/util/createtest.pl old mode 100755 new mode 100644 diff --git a/Tools/find-includes-cycles.py b/Tools/find-includes-cycles.py old mode 100755 new mode 100644 diff --git a/Tools/lint.sh b/Tools/lint.sh old mode 100755 new mode 100644 diff --git a/Tools/mac-codesign.sh b/Tools/mac-codesign.sh old mode 100755 new mode 100644 diff --git a/Tools/perf-disassemble.sh b/Tools/perf-disassemble.sh old mode 100755 new mode 100644 diff --git a/Tools/symbolicate-ppc.py b/Tools/symbolicate-ppc.py old mode 100755 new mode 100644 diff --git a/Tools/update-license-headers.sh b/Tools/update-license-headers.sh old mode 100755 new mode 100644 diff --git a/Tools/update-wiitdb.sh b/Tools/update-wiitdb.sh old mode 100755 new mode 100644