mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 14:46:49 +01:00
commit
c131b7c3b4
@ -595,7 +595,7 @@ bool MainWindow::RequestStop()
|
|||||||
|
|
||||||
void MainWindow::ForceStop()
|
void MainWindow::ForceStop()
|
||||||
{
|
{
|
||||||
BootManager::Stop();
|
Core::Stop();
|
||||||
EnableScreenSaver(true);
|
EnableScreenSaver(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "Core/Analytics.h"
|
#include "Core/Analytics.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
|
#include "Core/Core.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
#include "DolphinQt2/Settings.h"
|
#include "DolphinQt2/Settings.h"
|
||||||
#include "UICommon/AutoUpdate.h"
|
#include "UICommon/AutoUpdate.h"
|
||||||
@ -38,6 +39,9 @@ GeneralPane::GeneralPane(QWidget* parent) : QWidget(parent)
|
|||||||
LoadConfig();
|
LoadConfig();
|
||||||
|
|
||||||
ConnectLayout();
|
ConnectLayout();
|
||||||
|
|
||||||
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||||
|
&GeneralPane::OnEmulationStateChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralPane::CreateLayout()
|
void GeneralPane::CreateLayout()
|
||||||
@ -59,6 +63,17 @@ void GeneralPane::CreateLayout()
|
|||||||
setLayout(m_main_layout);
|
setLayout(m_main_layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GeneralPane::OnEmulationStateChanged(Core::State state)
|
||||||
|
{
|
||||||
|
const bool running = state != Core::State::Uninitialized;
|
||||||
|
|
||||||
|
m_checkbox_dualcore->setEnabled(!running);
|
||||||
|
m_checkbox_cheats->setEnabled(!running);
|
||||||
|
m_radio_interpreter->setEnabled(!running);
|
||||||
|
m_radio_cached_interpreter->setEnabled(!running);
|
||||||
|
m_radio_jit->setEnabled(!running);
|
||||||
|
}
|
||||||
|
|
||||||
void GeneralPane::ConnectLayout()
|
void GeneralPane::ConnectLayout()
|
||||||
{
|
{
|
||||||
connect(m_checkbox_dualcore, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
|
connect(m_checkbox_dualcore, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig);
|
||||||
|
@ -14,6 +14,11 @@ class QRadioButton;
|
|||||||
class QSlider;
|
class QSlider;
|
||||||
class QVBoxLayout;
|
class QVBoxLayout;
|
||||||
|
|
||||||
|
namespace Core
|
||||||
|
{
|
||||||
|
enum class State;
|
||||||
|
}
|
||||||
|
|
||||||
class GeneralPane final : public QWidget
|
class GeneralPane final : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -29,6 +34,7 @@ private:
|
|||||||
|
|
||||||
void LoadConfig();
|
void LoadConfig();
|
||||||
void OnSaveConfig();
|
void OnSaveConfig();
|
||||||
|
void OnEmulationStateChanged(Core::State state);
|
||||||
|
|
||||||
// Widgets
|
// Widgets
|
||||||
QVBoxLayout* m_main_layout;
|
QVBoxLayout* m_main_layout;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user