DolphinWX: Enable/disable config UI options based on core state

This commit is contained in:
Lioncash
2016-11-05 08:29:29 -04:00
parent 0ad4e70fc5
commit bfa9cc2736
17 changed files with 211 additions and 145 deletions

View File

@ -0,0 +1,22 @@
// Copyright 2016 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "DolphinWX/WxEventUtils.h"
#include <wx/event.h>
#include "Core/Core.h"
#include "Core/NetPlayProto.h"
namespace WxEventUtils
{
void OnEnableIfCoreNotRunning(wxUpdateUIEvent& event)
{
event.Enable(!Core::IsRunning());
}
void OnEnableIfNetplayNotRunning(wxUpdateUIEvent& event)
{
event.Enable(!NetPlay::IsNetPlayRunning());
}
} // namespace WxEventUtils