diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-03-03 10:36:29 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-03-26 15:49:34 +0100 |
commit | f8a79a97c7d12da43b111a756f09ee7ad5ea28e9 (patch) | |
tree | 6728478a8e3bb2669ee4096cf354e87475b4469d /main/tests | |
parent | 4396e98834f159da59ec790f2ff64fb65dacd9ce (diff) |
Effective DisplayServer separation, rename X11 -> LinuxBSD
Diffstat (limited to 'main/tests')
-rw-r--r-- | main/tests/test_physics.cpp | 3 | ||||
-rw-r--r-- | main/tests/test_physics_2d.cpp | 3 | ||||
-rw-r--r-- | main/tests/test_render.cpp | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp index 4931d42674..7727af6ad1 100644 --- a/main/tests/test_physics.cpp +++ b/main/tests/test_physics.cpp @@ -36,6 +36,7 @@ #include "core/os/main_loop.h" #include "core/os/os.h" #include "core/print_string.h" +#include "servers/display_server.h" #include "servers/physics_server.h" #include "servers/visual_server.h" @@ -313,7 +314,7 @@ public: camera = vs->camera_create(); RID viewport = vs->viewport_create(); - Size2i screen_size = OS::get_singleton()->get_window_size(); + Size2i screen_size = DisplayServer::get_singleton()->window_get_size(); vs->viewport_set_size(viewport, screen_size.x, screen_size.y); vs->viewport_attach_to_screen(viewport, Rect2(Vector2(), screen_size)); vs->viewport_set_active(viewport, true); diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp index 160c25f43a..4403e40b76 100644 --- a/main/tests/test_physics_2d.cpp +++ b/main/tests/test_physics_2d.cpp @@ -35,6 +35,7 @@ #include "core/os/os.h" #include "core/print_string.h" #include "scene/resources/texture.h" +#include "servers/display_server.h" #include "servers/physics_2d_server.h" #include "servers/visual_server.h" @@ -354,7 +355,7 @@ public: RID vp = vs->viewport_create(); canvas = vs->canvas_create(); - Size2i screen_size = OS::get_singleton()->get_window_size(); + Size2i screen_size = DisplayServer::get_singleton()->window_get_size(); vs->viewport_attach_canvas(vp, canvas); vs->viewport_set_size(vp, screen_size.x, screen_size.y); vs->viewport_attach_to_screen(vp, Rect2(Vector2(), screen_size)); diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp index 62239a5cb5..0fbc5ea697 100644 --- a/main/tests/test_render.cpp +++ b/main/tests/test_render.cpp @@ -36,6 +36,7 @@ #include "core/os/main_loop.h" #include "core/os/os.h" #include "core/print_string.h" +#include "servers/display_server.h" #include "servers/visual_server.h" #define OBJECT_COUNT 50 @@ -163,7 +164,7 @@ public: // vs->camera_set_perspective( camera, 60.0,0.1, 100.0 ); viewport = vs->viewport_create(); - Size2i screen_size = OS::get_singleton()->get_window_size(); + Size2i screen_size = DisplayServer::get_singleton()->window_get_size(); vs->viewport_set_size(viewport, screen_size.x, screen_size.y); vs->viewport_attach_to_screen(viewport, Rect2(Vector2(), screen_size)); vs->viewport_set_active(viewport, true); |