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.
This commit is contained in:
Ryan Houdek
2016-01-26 07:35:17 -06:00
parent 184a7a3e0d
commit 628e9bad92
5 changed files with 26 additions and 10 deletions

View File

@ -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;