Qt/Settings: Add debug mode flag
This commit is contained in:
parent
1df69c5750
commit
ff283ff912
|
@ -73,6 +73,7 @@ int main(int argc, char* argv[])
|
||||||
UICommon::CreateDirectories();
|
UICommon::CreateDirectories();
|
||||||
UICommon::Init();
|
UICommon::Init();
|
||||||
Resources::Init();
|
Resources::Init();
|
||||||
|
Settings::Instance().SetDebugModeEnabled(options.is_set("debugger"));
|
||||||
|
|
||||||
// Hook up alerts from core
|
// Hook up alerts from core
|
||||||
RegisterMsgAlertHandler(QtMsgAlertHandler);
|
RegisterMsgAlertHandler(QtMsgAlertHandler);
|
||||||
|
|
|
@ -196,3 +196,17 @@ void Settings::SetCheatsEnabled(bool enabled)
|
||||||
emit EnableCheatsChanged(enabled);
|
emit EnableCheatsChanged(enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Settings::SetDebugModeEnabled(bool enabled)
|
||||||
|
{
|
||||||
|
if (IsDebugModeEnabled() != enabled)
|
||||||
|
{
|
||||||
|
SConfig::GetInstance().bEnableDebugging = enabled;
|
||||||
|
emit DebugModeToggled(enabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Settings::IsDebugModeEnabled() const
|
||||||
|
{
|
||||||
|
return SConfig::GetInstance().bEnableDebugging;
|
||||||
|
}
|
||||||
|
|
|
@ -78,9 +78,12 @@ public:
|
||||||
bool GetCheatsEnabled() const;
|
bool GetCheatsEnabled() const;
|
||||||
void SetCheatsEnabled(bool enabled);
|
void SetCheatsEnabled(bool enabled);
|
||||||
|
|
||||||
|
// Debug
|
||||||
|
void SetDebugModeEnabled(bool enabled);
|
||||||
|
bool IsDebugModeEnabled() const;
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
GameListModel* GetGameListModel() const;
|
GameListModel* GetGameListModel() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void ConfigChanged();
|
void ConfigChanged();
|
||||||
void EmulationStateChanged(Core::State new_state);
|
void EmulationStateChanged(Core::State new_state);
|
||||||
|
@ -93,8 +96,10 @@ signals:
|
||||||
void LogVisibilityChanged(bool visible);
|
void LogVisibilityChanged(bool visible);
|
||||||
void LogConfigVisibilityChanged(bool visible);
|
void LogConfigVisibilityChanged(bool visible);
|
||||||
void EnableCheatsChanged(bool enabled);
|
void EnableCheatsChanged(bool enabled);
|
||||||
|
void DebugModeToggled(bool enabled);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool m_registers_visible = false;
|
||||||
std::unique_ptr<NetPlayClient> m_client;
|
std::unique_ptr<NetPlayClient> m_client;
|
||||||
std::unique_ptr<NetPlayServer> m_server;
|
std::unique_ptr<NetPlayServer> m_server;
|
||||||
Settings();
|
Settings();
|
||||||
|
|
Loading…
Reference in New Issue