Add Emu.HasGui() to properly hide Qt dialogs in no-gui mode

This commit is contained in:
Megamouse 2019-12-03 08:32:28 +01:00
parent 84f9911163
commit 46ca39ec4d
10 changed files with 26 additions and 10 deletions

View file

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/PPUModule.h"

View file

@ -250,6 +250,7 @@ class Emulator final
u32 m_usrid{1};
bool m_force_boot = false;
bool m_has_gui = true;
public:
Emulator() = default;
@ -372,6 +373,9 @@ public:
bool IsStopped() const { return m_state == system_state::stopped; }
bool IsReady() const { return m_state == system_state::ready; }
auto GetStatus() const { return m_state.load(); }
bool HasGui() const { return m_has_gui; }
void SetHasGui(bool has_gui) { m_has_gui = has_gui; }
};
extern Emulator Emu;