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

89 lines
2.9 KiB
C
Raw Normal View History

2012-12-19 09:30:18 +00:00
/****************************************************************************
* *
2015-11-10 05:21:49 +00:00
* Project64 - A Nintendo 64 emulator. *
2012-12-19 09:30:18 +00:00
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#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_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_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,
};
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:
2016-09-24 20:46:19 +00:00
CSystemEvents(); // Disable default constructor
CSystemEvents(const CSystemEvents&); // Disable copy constructor
CSystemEvents& operator=(const CSystemEvents&); // Disable assignment
2016-09-24 20:46:19 +00:00
void ChangePluginFunc();
2016-09-24 20:46:19 +00:00
CN64System * m_System;
CPlugins * m_Plugins;
EventList m_Events;
2015-12-06 09:59:58 +00:00
int32_t m_bDoSomething;
2016-09-24 20:46:19 +00:00
CriticalSection m_CS;
2015-01-31 19:27:27 +00:00
};