summaryrefslogtreecommitdiffstats
path: root/platform/server/os_server.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 13:23:58 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:54:55 +0200
commit0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch)
treea27e497da7104dd0a64f98a04fa3067668735e91 /platform/server/os_server.cpp
parent710b34b70227becdc652b4ae027fe0ac47409642 (diff)
downloadredot-engine-0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a.tar.gz
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
Diffstat (limited to 'platform/server/os_server.cpp')
-rw-r--r--platform/server/os_server.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 0fda0663a2..bcf0deeba9 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -42,11 +42,9 @@
#include <unistd.h>
int OS_Server::get_video_driver_count() const {
-
return 1;
}
const char *OS_Server::get_video_driver_name(int p_driver) const {
-
return "Dummy";
}
@@ -55,7 +53,6 @@ int OS_Server::get_audio_driver_count() const {
}
const char *OS_Server::get_audio_driver_name(int p_driver) const {
-
return "Dummy";
}
@@ -64,14 +61,12 @@ int OS_Server::get_current_video_driver() const {
}
void OS_Server::initialize_core() {
-
crash_handler.initialize();
OS_Unix::initialize_core();
}
Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
-
args = OS::get_singleton()->get_cmdline_args();
current_videomode = p_desired;
main_loop = nullptr;
@@ -96,7 +91,6 @@ Error OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int
}
void OS_Server::finalize() {
-
if (main_loop)
memdelete(main_loop);
main_loop = nullptr;
@@ -116,22 +110,18 @@ void OS_Server::set_mouse_show(bool p_show) {
}
void OS_Server::set_mouse_grab(bool p_grab) {
-
grab = p_grab;
}
bool OS_Server::is_mouse_grab_enabled() const {
-
return grab;
}
int OS_Server::get_mouse_button_state() const {
-
return 0;
}
Point2 OS_Server::get_mouse_position() const {
-
return Point2();
}
@@ -142,12 +132,10 @@ void OS_Server::set_video_mode(const VideoMode &p_video_mode, int p_screen) {
}
OS::VideoMode OS_Server::get_video_mode(int p_screen) const {
-
return current_videomode;
}
Size2 OS_Server::get_window_size() const {
-
return Vector2(current_videomode.width, current_videomode.height);
}
@@ -155,30 +143,25 @@ void OS_Server::get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen)
}
MainLoop *OS_Server::get_main_loop() const {
-
return main_loop;
}
void OS_Server::delete_main_loop() {
-
if (main_loop)
memdelete(main_loop);
main_loop = nullptr;
}
void OS_Server::set_main_loop(MainLoop *p_main_loop) {
-
main_loop = p_main_loop;
input->set_main_loop(p_main_loop);
}
bool OS_Server::can_draw() const {
-
return false; //can never draw
};
String OS_Server::get_name() const {
-
return "Server";
}
@@ -190,7 +173,6 @@ bool OS_Server::_check_internal_feature_support(const String &p_feature) {
}
void OS_Server::run() {
-
force_quit = false;
if (!main_loop)
@@ -199,7 +181,6 @@ void OS_Server::run() {
main_loop->init();
while (!force_quit) {
-
if (Main::iteration())
break;
};
@@ -208,7 +189,6 @@ void OS_Server::run() {
}
String OS_Server::get_config_path() const {
-
if (has_environment("XDG_CONFIG_HOME")) {
return get_environment("XDG_CONFIG_HOME");
} else if (has_environment("HOME")) {
@@ -219,7 +199,6 @@ String OS_Server::get_config_path() const {
}
String OS_Server::get_data_path() const {
-
if (has_environment("XDG_DATA_HOME")) {
return get_environment("XDG_DATA_HOME");
} else if (has_environment("HOME")) {
@@ -230,7 +209,6 @@ String OS_Server::get_data_path() const {
}
String OS_Server::get_cache_path() const {
-
if (has_environment("XDG_CACHE_HOME")) {
return get_environment("XDG_CACHE_HOME");
} else if (has_environment("HOME")) {
@@ -241,46 +219,37 @@ String OS_Server::get_cache_path() const {
}
String OS_Server::get_system_dir(SystemDir p_dir) const {
-
String xdgparam;
switch (p_dir) {
case SYSTEM_DIR_DESKTOP: {
-
xdgparam = "DESKTOP";
} break;
case SYSTEM_DIR_DCIM: {
-
xdgparam = "PICTURES";
} break;
case SYSTEM_DIR_DOCUMENTS: {
-
xdgparam = "DOCUMENTS";
} break;
case SYSTEM_DIR_DOWNLOADS: {
-
xdgparam = "DOWNLOAD";
} break;
case SYSTEM_DIR_MOVIES: {
-
xdgparam = "VIDEOS";
} break;
case SYSTEM_DIR_MUSIC: {
-
xdgparam = "MUSIC";
} break;
case SYSTEM_DIR_PICTURES: {
-
xdgparam = "PICTURES";
} break;
case SYSTEM_DIR_RINGTONES: {
-
xdgparam = "MUSIC";
} break;
@@ -304,7 +273,6 @@ bool OS_Server::is_disable_crash_handler() const {
}
OS_Server::OS_Server() {
-
//adriver here
grab = false;
};