SPEC-7531 Change Code/CryEngine to Code/Legacy (#1634)
* git mv Code\CryEngine Code\Legacy * redirecting CMakeLists.txt * fixing uic warning * Some more CryEngine mentions * validation scripts Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CRYINCLUDE_CRYSYSTEM_SYSTEMEVENTDISPATCHER_H
|
||||
#define CRYINCLUDE_CRYSYSTEM_SYSTEMEVENTDISPATCHER_H
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <ISystem.h>
|
||||
#include <CryListenerSet.h>
|
||||
|
||||
class CSystemEventDispatcher
|
||||
: public ISystemEventDispatcher
|
||||
{
|
||||
public:
|
||||
CSystemEventDispatcher();
|
||||
virtual ~CSystemEventDispatcher(){}
|
||||
|
||||
// ISystemEventDispatcher
|
||||
virtual bool RegisterListener(ISystemEventListener* pListener);
|
||||
virtual bool RemoveListener(ISystemEventListener* pListener);
|
||||
|
||||
virtual void OnSystemEvent(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam);
|
||||
virtual void Update();
|
||||
|
||||
// ~ISystemEventDispatcher
|
||||
private:
|
||||
void OnSystemEventAnyThread(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam);
|
||||
|
||||
typedef CListenerSet<ISystemEventListener*> TSystemEventListeners;
|
||||
TSystemEventListeners m_listeners;
|
||||
|
||||
// for the events coming from other threads
|
||||
struct SEventParams
|
||||
{
|
||||
ESystemEvent event;
|
||||
UINT_PTR wparam;
|
||||
UINT_PTR lparam;
|
||||
};
|
||||
|
||||
typedef CryMT::queue<SEventParams> TSystemEventQueue;
|
||||
TSystemEventQueue m_systemEventQueue;
|
||||
CryCriticalSection m_listenerRegistrationLock;
|
||||
};
|
||||
|
||||
#endif // CRYINCLUDE_CRYSYSTEM_SYSTEMEVENTDISPATCHER_H
|
||||
Reference in New Issue
Block a user