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:
parent
c8a0a42e62
commit
2e3648cb60
@ -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);
|
||||
};
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user