summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorEmmanuel Leblond <emmanuel.leblond@gmail.com>2018-01-03 18:26:44 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-04 15:15:55 +0100
commite315c94900be47e61152a2958011e14b7e635a3e (patch)
tree9fbe974664cd253d3fdd0792db0b7b5f91cfcde6 /platform/android
parent99eb394a5f5f164a562e315980cb730a704a0a1c (diff)
Change OS::initialize signature to return Error (fix segfault on x11)
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/os_android.cpp4
-rw-r--r--platform/android/os_android.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 97e81874c9..1542f4a5e4 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -120,7 +120,7 @@ void OS_Android::set_opengl_extensions(const char *p_gl_extensions) {
gl_extensions = p_gl_extensions;
}
-void OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
+Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
use_gl2 = p_video_driver != 1;
@@ -146,6 +146,8 @@ void OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
input->set_fallback_mapping("Default Android Gamepad");
//power_manager = memnew(power_android);
+
+ return OK;
}
void OS_Android::set_main_loop(MainLoop *p_main_loop) {
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index adfd88b59b..c0ab2acd2e 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -145,7 +145,7 @@ public:
virtual const char *get_audio_driver_name(int p_driver) const;
virtual void initialize_core();
- virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
+ virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);
virtual void set_main_loop(MainLoop *p_main_loop);
virtual void delete_main_loop();