From 2eec1c9f755cac2ca180383632e76c663b01d801 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 26 Dec 2020 17:20:30 +0100 Subject: [PATCH] source/Game.cpp: use PlatformApplication::create() --- source/Game.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/source/Game.cpp b/source/Game.cpp index e8ff9c2..573b5af 100644 --- a/source/Game.cpp +++ b/source/Game.cpp @@ -4,27 +4,18 @@ #include #include #include +#include #include +#include #include -// TODO: move this to Application::create() -#ifdef _WIN32 -#include -typedef sp::Win32Application ApplicationType; -#elif defined(__linux__) || defined(unix) || defined(__unix) || defined(__unix__) -#include -typedef sp::UnixApplication ApplicationType; -#else -#error "No Application implementation exists" -#endif - namespace sp { Game::Game() : m_running(false) { - m_platform = new ApplicationType(); + m_platform = PlatformApplication::create(); m_graphics = new Graphics(m_platform); m_input = new InputModule(&m_platform->getInput()); m_messageHandler = new MessageHandler();