project64/Source/Project64-core/N64System/Mips/SystemEvents.h

86 lines
2.2 KiB
C
Raw Normal View History

2012-12-19 09:30:18 +00:00
#pragma once
2015-12-19 23:57:27 +00:00
#include <Common/CriticalSection.h>
2015-12-06 09:59:58 +00:00
2015-03-29 17:19:28 +00:00
enum SystemEvent
{
SysEvent_ExecuteInterrupt,
SysEvent_GSButtonPressed,
SysEvent_ResetCPU_Soft,
SysEvent_ResetCPU_SoftDone,
SysEvent_ResetCPU_Hard,
SysEvent_CloseCPU,
SysEvent_PauseCPU_FromMenu,
SysEvent_PauseCPU_AppLostActive,
SysEvent_PauseCPU_AppLostActiveDelay,
SysEvent_PauseCPU_AppLostFocus,
SysEvent_PauseCPU_SaveGame,
SysEvent_PauseCPU_LoadGame,
SysEvent_PauseCPU_DumpMemory,
SysEvent_PauseCPU_SearchMemory,
SysEvent_PauseCPU_Settings,
SysEvent_PauseCPU_Cheats,
SysEvent_PauseCPU_ChangingBPs,
2021-01-17 03:17:58 +00:00
SysEvent_PauseCPU_Enhancement,
SysEvent_ResumeCPU_FromMenu,
SysEvent_ResumeCPU_AppGainedActive,
SysEvent_ResumeCPU_AppGainedFocus,
SysEvent_ResumeCPU_SaveGame,
SysEvent_ResumeCPU_LoadGame,
SysEvent_ResumeCPU_DumpMemory,
SysEvent_ResumeCPU_SearchMemory,
SysEvent_ResumeCPU_Settings,
SysEvent_ResumeCPU_Cheats,
SysEvent_ResumeCPU_ChangingBPs,
2021-01-17 03:17:58 +00:00
SysEvent_ResumeCPU_Enhancement,
SysEvent_ChangingFullScreen,
SysEvent_ChangePlugins,
SysEvent_SaveMachineState,
SysEvent_LoadMachineState,
SysEvent_Interrupt_SP,
SysEvent_Interrupt_SI,
SysEvent_Interrupt_AI,
SysEvent_Interrupt_VI,
SysEvent_Interrupt_PI,
SysEvent_Interrupt_DP,
2016-10-02 21:46:05 +00:00
SysEvent_ResetFunctionTimes,
SysEvent_DumpFunctionTimes,
SysEvent_ResetRecompilerCode,
};
const char * SystemEventName(SystemEvent event);
2015-12-06 09:59:58 +00:00
class CN64System;
class CPlugins;
class CSystemEvents
{
2016-09-24 20:46:19 +00:00
typedef std::vector<SystemEvent> EventList;
protected:
2016-09-24 20:46:19 +00:00
CSystemEvents(CN64System * System, CPlugins * Plugins);
virtual ~CSystemEvents();
public:
2016-09-24 20:46:19 +00:00
void ExecuteEvents();
void QueueEvent(SystemEvent action);
2015-12-06 09:59:58 +00:00
const int32_t & DoSomething() const
2016-09-24 20:46:19 +00:00
{
return m_bDoSomething;
}
private:
CSystemEvents();
2022-10-10 00:22:17 +00:00
CSystemEvents(const CSystemEvents &);
CSystemEvents & operator=(const CSystemEvents &);
2016-09-24 20:46:19 +00:00
void ChangePluginFunc();
2022-10-10 00:22:17 +00:00
CN64System * m_System;
CPlugins * m_Plugins;
EventList m_Events;
int32_t m_bDoSomething;
2016-09-24 20:46:19 +00:00
CriticalSection m_CS;
2015-01-31 19:27:27 +00:00
};