From dfceab59abf6743e02e86b1105c6fe253335363e Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 31 Oct 2015 14:14:32 -1000 Subject: [PATCH] Brought linux in sync with OSX fixes --- lib/x11/ApplicationUnix.cpp | 20 ++++++++++---------- lib/x11/ApplicationWayland.hpp | 4 ++-- lib/x11/ApplicationXCB.hpp | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/x11/ApplicationUnix.cpp b/lib/x11/ApplicationUnix.cpp index 79fe78a..2b14115 100644 --- a/lib/x11/ApplicationUnix.cpp +++ b/lib/x11/ApplicationUnix.cpp @@ -48,24 +48,24 @@ namespace boo { IApplication* APP = NULL; -std::unique_ptr ApplicationBootstrap(IApplication::EPlatformType platform, - IApplicationCallback& cb, - const std::string& uniqueName, - const std::string& friendlyName, - const std::string& pname, - const std::vector& args, - bool singleInstance) +int ApplicationRun(IApplication::EPlatformType platform, + IApplicationCallback& cb, + const std::string& uniqueName, + const std::string& friendlyName, + const std::string& pname, + const std::vector& args, + bool singleInstance) { if (APP) - return std::unique_ptr(); + return 1; if (platform == IApplication::PLAT_WAYLAND) APP = new ApplicationWayland(cb, uniqueName, friendlyName, pname, args, singleInstance); else if (platform == IApplication::PLAT_XCB || platform == IApplication::PLAT_AUTO) APP = new ApplicationXCB(cb, uniqueName, friendlyName, pname, args, singleInstance); else - return std::unique_ptr(); - return std::unique_ptr(APP); + return 1; + return APP->run(); } } diff --git a/lib/x11/ApplicationWayland.hpp b/lib/x11/ApplicationWayland.hpp index 352a32f..3c97e47 100644 --- a/lib/x11/ApplicationWayland.hpp +++ b/lib/x11/ApplicationWayland.hpp @@ -71,9 +71,9 @@ public: return m_args; } - std::unique_ptr newWindow(const std::string& title) + IWindow* newWindow(const std::string& title) { - return std::unique_ptr(_WindowWaylandNew(title)); + return _WindowWaylandNew(title); } }; diff --git a/lib/x11/ApplicationXCB.hpp b/lib/x11/ApplicationXCB.hpp index cacc74f..4e253bb 100644 --- a/lib/x11/ApplicationXCB.hpp +++ b/lib/x11/ApplicationXCB.hpp @@ -306,11 +306,11 @@ public: return m_args; } - std::unique_ptr newWindow(const std::string& title) + IWindow* newWindow(const std::string& title) { IWindow* newWindow = _WindowXCBNew(title, m_xDisp, m_xDefaultScreen, m_lastGlxCtx); m_windows[(Window)newWindow->getPlatformHandle()] = newWindow; - return std::unique_ptr(newWindow); + return newWindow; } /* Last GLX context */