1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Move alert function from DisplayServer to OS.

This commit is contained in:
bruvzg
2021-07-22 19:23:48 +03:00
parent 5de991d57c
commit 618eb27e8b
36 changed files with 377 additions and 350 deletions

View File

@@ -334,13 +334,6 @@ bool DisplayServerAndroid::can_any_window_draw() const {
return true;
}
void DisplayServerAndroid::alert(const String &p_alert, const String &p_title) {
GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
ERR_FAIL_COND(!godot_java);
godot_java->alert(p_alert, p_title);
}
void DisplayServerAndroid::process_events() {
Input::get_singleton()->flush_accumulated_events();
}
@@ -361,7 +354,7 @@ Vector<String> DisplayServerAndroid::get_rendering_drivers_func() {
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_resolution, Error &r_error) {
DisplayServer *ds = memnew(DisplayServerAndroid(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
if (r_error != OK) {
ds->alert("Your video card driver does not support any of the supported Vulkan versions.", "Unable to initialize Video driver");
OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan versions.", "Unable to initialize Video driver");
}
return ds;
}