mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
move module initialization into a module manager, still has some issues like stopping not working and debug crashing add #idef 0 to modules that aren't in the windows project don't double initialize and don't de-initialize for now, since many modules don't expect it and it leads to many errors remove duplicate module lists for empty modules and implemented ones, make Module non-copyable but movable add secondary project, no real use for it now add some memleak config to the emucore and add asmjit path to rpcs3 small rebase error fixed to get it to compile again add filters for emucore re-add the module manager and static file WIP commit, linker errors abound some more abstraction layer stuff fix the remaining linker errors, re-enable platform specific mouse, pad and keyboard handlers rebasing fix memset undefined and re() usage of se_t before declaration Add wxGUI define by default for cmake builds fix copy constructors of Datetime header fix copy constructors of other wx interface classes remove static declarations of global variables make wxGLCanvas constructor non-ambiguous even with wx2.8. compat mode, fix wrong std::exception constructor calls remove duplicate definition for FromUTF8 and ToUTF8 temp changes
54 lines
No EOL
933 B
C++
54 lines
No EOL
933 B
C++
#pragma once
|
|
#include "Emu/GS/GCM.h"
|
|
#include "Emu/GS/RSXThread.h"
|
|
|
|
struct GSRender : public RSXThread
|
|
{
|
|
virtual ~GSRender()
|
|
{
|
|
}
|
|
|
|
virtual void Close()=0;
|
|
};
|
|
|
|
enum GSLockType
|
|
{
|
|
GS_LOCK_NOT_WAIT,
|
|
GS_LOCK_WAIT_FLUSH,
|
|
GS_LOCK_WAIT_FLIP,
|
|
};
|
|
|
|
struct GSLock
|
|
{
|
|
private:
|
|
GSRender& m_renderer;
|
|
GSLockType m_type;
|
|
|
|
public:
|
|
GSLock(GSRender& renderer, GSLockType type)
|
|
: m_renderer(renderer)
|
|
, m_type(type)
|
|
{
|
|
switch(m_type)
|
|
{
|
|
case GS_LOCK_NOT_WAIT: m_renderer.m_cs_main.Enter(); break;
|
|
case GS_LOCK_WAIT_FLUSH: m_renderer.m_sem_flush.Wait(); break;
|
|
case GS_LOCK_WAIT_FLIP: m_renderer.m_sem_flip.Wait(); break;
|
|
}
|
|
}
|
|
|
|
~GSLock()
|
|
{
|
|
switch(m_type)
|
|
{
|
|
case GS_LOCK_NOT_WAIT: m_renderer.m_cs_main.Leave(); break;
|
|
case GS_LOCK_WAIT_FLUSH: m_renderer.m_sem_flush.Post(); break;
|
|
case GS_LOCK_WAIT_FLIP: m_renderer.m_sem_flip.Post(); break;
|
|
}
|
|
}
|
|
};
|
|
|
|
struct GSLockCurrent : GSLock
|
|
{
|
|
GSLockCurrent(GSLockType type);
|
|
}; |