diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-07 13:21:36 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-07 13:21:36 +0100 |
commit | d642274f75fb8ca6d3b9d4c314269e6f559051c7 (patch) | |
tree | 7dbf61077d234d636dfd33f85007bcc06f66fb69 /platform/android/display_server_android.cpp | |
parent | 3579d7a9f74e3f1eda88826897feb4b866d75ec9 (diff) | |
parent | 2718a7b7d39962100e59b8616077603034d77f8e (diff) | |
download | redot-engine-d642274f75fb8ca6d3b9d4c314269e6f559051c7.tar.gz |
Merge pull request #70939 from bruvzg/win_screen_2
Add support for the custom initial screen for the main window, fix primary screen detection.
Diffstat (limited to 'platform/android/display_server_android.cpp')
-rw-r--r-- | platform/android/display_server_android.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp index f8865cc563..70370764e2 100644 --- a/platform/android/display_server_android.cpp +++ b/platform/android/display_server_android.cpp @@ -184,6 +184,10 @@ int DisplayServerAndroid::get_screen_count() const { return 1; } +int DisplayServerAndroid::get_primary_screen() const { + return 0; +} + Point2i DisplayServerAndroid::screen_get_position(int p_screen) const { return Point2i(0, 0); } @@ -459,8 +463,8 @@ Vector<String> DisplayServerAndroid::get_rendering_drivers_func() { return drivers; } -DisplayServer *DisplayServerAndroid::create_func(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) { - DisplayServer *ds = memnew(DisplayServerAndroid(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, r_error)); +DisplayServer *DisplayServerAndroid::create_func(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Error &r_error) { + DisplayServer *ds = memnew(DisplayServerAndroid(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, p_screen, r_error)); if (r_error != OK) { OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan versions.", "Unable to initialize Video driver"); if (p_rendering_driver == "vulkan") { @@ -512,7 +516,7 @@ void DisplayServerAndroid::notify_surface_changed(int p_width, int p_height) { rect_changed_callback.callp(reinterpret_cast<const Variant **>(&sizep), 1, ret, ce); } -DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, Error &r_error) { +DisplayServerAndroid::DisplayServerAndroid(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Error &r_error) { rendering_driver = p_rendering_driver; keep_screen_on = GLOBAL_GET("display/window/energy_saving/keep_screen_on"); |