mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 20:19:38 +00:00
OpenGL display driver
This commit is contained in:
27
AerofoilSDL/GpFiber_SDL.cpp
Normal file
27
AerofoilSDL/GpFiber_SDL.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "GpFiber_SDL.h"
|
||||
#include "HostSystemServices.h"
|
||||
#include "HostThreadEvent.h"
|
||||
|
||||
#include "GpSystemServices_Win32.h"
|
||||
|
||||
GpFiber_SDL::GpFiber_SDL(SDL_Thread *thread, PortabilityLayer::HostThreadEvent *threadEvent)
|
||||
: m_event(threadEvent)
|
||||
, m_thread(thread)
|
||||
{
|
||||
}
|
||||
|
||||
GpFiber_SDL::~GpFiber_SDL()
|
||||
{
|
||||
m_event->Destroy();
|
||||
}
|
||||
|
||||
void GpFiber_SDL::YieldTo(IGpFiber *toFiber)
|
||||
{
|
||||
static_cast<GpFiber_SDL*>(toFiber)->m_event->Signal();
|
||||
m_event->Wait();
|
||||
}
|
||||
|
||||
void GpFiber_SDL::Destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
Reference in New Issue
Block a user