From 628e9bad92673c27a974649ee18c48483003347a Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 26 Jan 2016 07:35:17 -0600 Subject: Support a headless EGL option. This is a new option to support completely headless running of Dolphin without X11 on systems that can properly support it. --- Source/Core/DolphinWX/MainNoGUI.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Source/Core/DolphinWX/MainNoGUI.cpp') diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 70f099deb7..180af3ffe2 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -35,11 +35,11 @@ static bool running = true; class Platform { public: - virtual void Init() = 0; - virtual void SetTitle(const std::string &title) = 0; - virtual void MainLoop() = 0; - virtual void Shutdown() = 0; - virtual ~Platform() {}; + virtual void Init() {} + virtual void SetTitle(const std::string &title) {} + virtual void MainLoop() { while(running) {} } + virtual void Shutdown() {} + virtual ~Platform() {} }; static Platform* platform; @@ -54,7 +54,7 @@ void Host_Message(int Id) running = false; } -static void* s_window_handle; +static void* s_window_handle = nullptr; void* Host_GetRenderHandle() { return s_window_handle; @@ -291,7 +291,9 @@ class PlatformX11 : public Platform static Platform* GetPlatform() { -#if HAVE_X11 +#if defined(USE_EGL) && defined(USE_HEADLESS) + return new Platform(); +#elif HAVE_X11 return new PlatformX11(); #endif return nullptr; -- cgit v1.2.3