mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
c37905e465
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
130 lines
2.4 KiB
C++
130 lines
2.4 KiB
C++
#include "stdafx.h"
|
|
|
|
rSemaphore::rSemaphore()
|
|
{
|
|
handle = reinterpret_cast<void*>(new wxSemaphore());
|
|
}
|
|
|
|
//rSemaphore::rSemaphore(rSemaphore& other)
|
|
//{
|
|
// handle = reinterpret_cast<void*>(new wxSemaphore(*reinterpret_cast<wxSemaphore*>(other.handle)));
|
|
//}
|
|
|
|
rSemaphore::~rSemaphore()
|
|
{
|
|
delete reinterpret_cast<wxSemaphore*>(handle);
|
|
}
|
|
|
|
rSemaphore::rSemaphore(int initial_count, int max_count)
|
|
{
|
|
handle = reinterpret_cast<void*>(new wxSemaphore(initial_count,max_count));
|
|
}
|
|
|
|
void rSemaphore::Wait()
|
|
{
|
|
reinterpret_cast<wxSemaphore*>(handle)->Wait();
|
|
}
|
|
|
|
rSemaStatus rSemaphore::TryWait()
|
|
{
|
|
wxSemaError err = reinterpret_cast<wxSemaphore*>(handle)->TryWait();
|
|
if (err == wxSEMA_BUSY)
|
|
{
|
|
return rSEMA_BUSY;
|
|
}
|
|
else
|
|
{
|
|
return rSEMA_OTHER;
|
|
}
|
|
}
|
|
|
|
void rSemaphore::Post()
|
|
{
|
|
reinterpret_cast<wxSemaphore*>(handle)->Post();
|
|
}
|
|
|
|
void rSemaphore::WaitTimeout(u64 timeout)
|
|
{
|
|
reinterpret_cast<wxSemaphore*>(handle)->WaitTimeout(timeout);
|
|
}
|
|
|
|
rCriticalSection::rCriticalSection()
|
|
{
|
|
handle = reinterpret_cast<void*>(new wxCriticalSection());
|
|
}
|
|
|
|
//rCriticalSection::rCriticalSection(rCriticalSection&)
|
|
//{
|
|
// handle = reinterpret_cast<void*>(new wxCriticalSection(*reinterpret_cast<wxCriticalSection*>(other.handle)));
|
|
//}
|
|
|
|
rCriticalSection::~rCriticalSection()
|
|
{
|
|
delete reinterpret_cast<wxCriticalSection*>(handle);
|
|
}
|
|
|
|
void rCriticalSection::Enter()
|
|
{
|
|
reinterpret_cast<wxCriticalSection*>(handle)->Enter();
|
|
}
|
|
|
|
void rCriticalSection::Leave()
|
|
{
|
|
reinterpret_cast<wxCriticalSection*>(handle)->Leave();
|
|
}
|
|
|
|
rTimer::rTimer()
|
|
{
|
|
handle = reinterpret_cast<void*>(new wxTimer());
|
|
}
|
|
|
|
//rTimer::rTimer(rTimer&)
|
|
//{
|
|
// handle = reinterpret_cast<void*>(new wxTimer(*reinterpret_cast<wxTimer*>(other.handle)));
|
|
//}
|
|
|
|
rTimer::~rTimer()
|
|
{
|
|
delete reinterpret_cast<wxTimer*>(handle);
|
|
}
|
|
|
|
void rTimer::Start()
|
|
{
|
|
reinterpret_cast<wxTimer*>(handle)->Start();
|
|
}
|
|
|
|
void rTimer::Stop()
|
|
{
|
|
reinterpret_cast<wxTimer*>(handle)->Stop();
|
|
}
|
|
|
|
void rSleep(u32 time)
|
|
{
|
|
wxSleep(time);
|
|
}
|
|
|
|
void rMicroSleep(u64 time)
|
|
{
|
|
wxMicroSleep(time);
|
|
}
|
|
|
|
rCriticalSectionLocker::rCriticalSectionLocker(const rCriticalSection &sec)
|
|
{
|
|
handle = reinterpret_cast<void*>(new wxCriticalSectionLocker(*reinterpret_cast<wxCriticalSection*>(sec.handle)));
|
|
}
|
|
|
|
|
|
rCriticalSectionLocker::~rCriticalSectionLocker()
|
|
{
|
|
delete reinterpret_cast<wxCriticalSectionLocker*>(handle);
|
|
}
|
|
|
|
bool rThread::IsMain()
|
|
{
|
|
return wxThread::IsMain();
|
|
}
|
|
|
|
void rYieldIfNeeded()
|
|
{
|
|
wxYieldIfNeeded();
|
|
} |