summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinNoGUI/MainNoGUI.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2018-10-03 23:03:22 +1000
committerStenzek <stenzek@gmail.com>2018-10-20 21:11:34 +1000
commiteb284b5d661cab6aed770e0e51b790917249ef21 (patch)
treeafad7299617c4788598e05a347ead4e1af5650ee /Source/Core/DolphinNoGUI/MainNoGUI.cpp
parent9c57a98723997736adea94383668fbdf8a993fd8 (diff)
VideoBackends: Pass window system info from host on creation
Diffstat (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp')
-rw-r--r--Source/Core/DolphinNoGUI/MainNoGUI.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
index 6447f6948b..6cd71bd353 100644
--- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp
+++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
@@ -72,8 +72,9 @@ public:
virtual void Shutdown() {}
virtual ~Platform() {}
- virtual void* GetDisplayHandle() { return nullptr; }
- virtual void* GetWindowHandle() { return nullptr; }
+ virtual WindowSystemType GetWindowSystem() const { return WindowSystemType::Headless; }
+ virtual void* GetDisplayHandle() const { return nullptr; }
+ virtual void* GetWindowHandle() const { return nullptr; }
};
static Platform* platform;
@@ -342,9 +343,9 @@ class PlatformX11 : public Platform
XCloseDisplay(dpy);
}
- void* GetDisplayHandle() override { return static_cast<void*>(dpy); }
-
- void* GetWindowHandle() override { return reinterpret_cast<void*>(win); }
+ WindowSystemType GetWindowSystem() const override { return WindowSystemType::X11; }
+ void* GetDisplayHandle() const override { return static_cast<void*>(dpy); }
+ void* GetWindowHandle() const override { return reinterpret_cast<void*>(win); }
};
#endif
@@ -424,10 +425,10 @@ int main(int argc, char* argv[])
DolphinAnalytics::Instance()->ReportDolphinStart("nogui");
- boot->display_connection = platform->GetDisplayHandle();
- boot->render_surface = platform->GetWindowHandle();
+ WindowSystemInfo wsi(platform->GetWindowSystem(), platform->GetDisplayHandle(),
+ platform->GetWindowHandle());
- if (!BootManager::BootCore(std::move(boot)))
+ if (!BootManager::BootCore(std::move(boot), wsi))
{
fprintf(stderr, "Could not boot the specified file\n");
return 1;