aboutsummaryrefslogtreecommitdiff
path: root/src/platform/bootstrap/Bootstrap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/bootstrap/Bootstrap.cpp')
-rw-r--r--src/platform/bootstrap/Bootstrap.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/platform/bootstrap/Bootstrap.cpp b/src/platform/bootstrap/Bootstrap.cpp
index 5c47e95c..e9183550 100644
--- a/src/platform/bootstrap/Bootstrap.cpp
+++ b/src/platform/bootstrap/Bootstrap.cpp
@@ -1,39 +1,21 @@
#include "cru/platform/bootstrap/Bootstrap.h"
+#include "cru/base/Base.h"
-#ifdef CRU_PLATFORM_WINDOWS
-#include "cru/platform/graphics/direct2d/Factory.h"
+#if defined(_WIN32)
#include "cru/platform/gui/win/UiApplication.h"
-#elif defined(CRU_PLATFORM_OSX)
-#include "cru/platform/graphics/quartz/Factory.h"
+#elif defined(__APPLE__)
#include "cru/platform/gui/osx/UiApplication.h"
-#elif defined(CRU_PLATFORM_EMSCRIPTEN)
-// TODO: Go fill this!
#else
-#include "cru/platform/graphics/cairo/CairoGraphicsFactory.h"
#endif
namespace cru::platform::bootstrap {
cru::platform::gui::IUiApplication* CreateUiApplication() {
-#ifdef CRU_PLATFORM_WINDOWS
+#if defined(_WIN32)
return new cru::platform::gui::win::WinUiApplication();
-#elif defined(CRU_PLATFORM_OSX)
+#elif defined(__APPLE__)
return new cru::platform::gui::osx::OsxUiApplication();
#else
- return nullptr;
+ NotImplemented();
#endif
}
-
-CRU_PLATFORM_BOOTSTRAP_API cru::platform::graphics::IGraphicsFactory*
-CreateGraphicsFactory() {
-#ifdef CRU_PLATFORM_WINDOWS
- return new cru::platform::graphics::direct2d::DirectGraphicsFactory();
-#elif defined(CRU_PLATFORM_OSX)
- return new cru::platform::graphics::quartz::QuartzGraphicsFactory();
-#elif defined(CRU_PLATFORM_EMSCRIPTEN)
- return nullptr; // TODO: Change this.
-#else
- return new cru::platform::graphics::cairo::CairoGraphicsFactory();
-#endif
-}
-
} // namespace cru::platform::bootstrap