mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DolphinWX: Enable/disable config UI options based on core state
This commit is contained in:
22
Source/Core/DolphinWX/WxEventUtils.cpp
Normal file
22
Source/Core/DolphinWX/WxEventUtils.cpp
Normal 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
|
Reference in New Issue
Block a user