From 814fdd398507bf697f249d58b8b349f253bb0289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 20 Jul 2018 11:56:18 +0200 Subject: [PATCH] Fix some more build issues after c69de2ba4 Fixes #20301. --- platform/haiku/os_haiku.cpp | 6 ++++++ platform/haiku/os_haiku.h | 2 ++ platform/server/os_server.h | 5 +---- platform/uwp/os_uwp.cpp | 6 ++++++ platform/uwp/os_uwp.h | 2 ++ platform/x11/os_x11.h | 4 ++-- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 97fab5ca0d7..209cb5cec4a 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -80,6 +80,10 @@ const char *OS_Haiku::get_video_driver_name(int p_driver) const { return "GLES3"; } +int OS_Haiku::get_current_video_driver() const { + return video_driver_index; +} + Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) { main_loop = NULL; current_video_mode = p_desired; @@ -124,6 +128,8 @@ Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p } */ + video_driver_index = p_video_driver; + input = memnew(InputDefault); window->SetInput(input); diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index 615ae682ef0..13d4420bdee 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -51,6 +51,7 @@ private: Rasterizer *rasterizer; VisualServer *visual_server; VideoMode current_video_mode; + int video_driver_index; PowerHaiku *power_manager; #ifdef MEDIA_KIT_ENABLED @@ -66,6 +67,7 @@ private: protected: virtual int get_video_driver_count() const; virtual const char *get_video_driver_name(int p_driver) const; + virtual int get_current_video_driver() const; virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver); virtual void finalize(); diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 8c47bfc5913..07d70e5236c 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -47,7 +47,6 @@ class OS_Server : public OS_Unix { - //Rasterizer *rasterizer; VisualServer *visual_server; VideoMode current_videomode; List args; @@ -73,7 +72,7 @@ class OS_Server : public OS_Unix { protected: virtual int get_video_driver_count() const; virtual const char *get_video_driver_name(int p_driver) const; - + virtual int get_current_video_driver() const; virtual int get_audio_driver_count() const; virtual const char *get_audio_driver_name(int p_driver) const; @@ -86,8 +85,6 @@ protected: public: virtual String get_name(); - virtual int get_current_video_driver() const; - virtual void set_cursor_shape(CursorShape p_shape); virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot); diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index 25326ae7947..8549a44ce52 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -77,6 +77,10 @@ Size2 OSUWP::get_window_size() const { return size; } +int OSUWP::get_current_video_driver() const { + return video_driver_index; +} + void OSUWP::set_window_size(const Size2 p_size) { Windows::Foundation::Size new_size; @@ -237,6 +241,8 @@ Error OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_au } gl_context->set_use_vsync(vm.use_vsync); + video_driver_index = p_video_driver; + visual_server = memnew(VisualServerRaster); // FIXME: Reimplement threaded rendering? Or remove? /* diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index 0f7f0686522..3b48063fe97 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -99,6 +99,7 @@ private: Windows::UI::Core::CoreWindow ^ window; VideoMode video_mode; + int video_driver_index; MainLoop *main_loop; @@ -154,6 +155,7 @@ private: // functions used by main to initialize/deintialize the OS protected: virtual int get_video_driver_count() const; + virtual int get_current_video_driver() const; virtual void initialize_core(); virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver); diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 4045a6e7ade..b67bc824be2 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -196,6 +196,8 @@ class OS_X11 : public OS_Unix { Bool xrandr_ext_ok; protected: + virtual int get_current_video_driver() const; + virtual void initialize_core(); virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver); virtual void finalize(); @@ -207,8 +209,6 @@ protected: bool is_window_maximize_allowed(); public: - virtual int get_current_video_driver() const; - virtual String get_name(); virtual void set_cursor_shape(CursorShape p_shape);