1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Add getter for retrieve the type of platform

This commit is contained in:
Mathieu Schroeter 2018-07-21 17:03:38 +02:00
parent c8a0a42e62
commit 2e3648cb60
3 changed files with 15 additions and 0 deletions

View File

@ -10,5 +10,8 @@ private:
static void timer (void *);
public:
enum Type { JS, SDL };
static Platform::Type getType ();
static void run (std::function<void(const SDL_Event &)> handleEvent);
};

View File

@ -8,6 +8,12 @@
std::function<void(const SDL_Event &)> Platform::handleEvent;
Platform::Type
Platform::getType ()
{
return JS;
}
void
Platform::run (std::function<void(const SDL_Event &)> handleEvent)
{

View File

@ -7,6 +7,12 @@
std::function<void(const SDL_Event &)> Platform::handleEvent;
Platform::Type
Platform::getType ()
{
return SDL;
}
void
Platform::run (std::function<void(const SDL_Event &)> handleEvent)
{