You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix null-pointer dereference on Android systems when using gl_compatibility renderer.
This commit is contained in:
@@ -676,16 +676,19 @@ void DisplayServerAndroid::cursor_set_custom_image(const Ref<Resource> &p_cursor
|
|||||||
|
|
||||||
void DisplayServerAndroid::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
|
void DisplayServerAndroid::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
|
||||||
#if defined(VULKAN_ENABLED)
|
#if defined(VULKAN_ENABLED)
|
||||||
|
if (context_vulkan) {
|
||||||
context_vulkan->set_vsync_mode(p_window, p_vsync_mode);
|
context_vulkan->set_vsync_mode(p_window, p_vsync_mode);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayServer::VSyncMode DisplayServerAndroid::window_get_vsync_mode(WindowID p_window) const {
|
DisplayServer::VSyncMode DisplayServerAndroid::window_get_vsync_mode(WindowID p_window) const {
|
||||||
#if defined(VULKAN_ENABLED)
|
#if defined(VULKAN_ENABLED)
|
||||||
|
if (context_vulkan) {
|
||||||
return context_vulkan->get_vsync_mode(p_window);
|
return context_vulkan->get_vsync_mode(p_window);
|
||||||
#else
|
}
|
||||||
return DisplayServer::VSYNC_ENABLED;
|
|
||||||
#endif
|
#endif
|
||||||
|
return DisplayServer::VSYNC_ENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayServerAndroid::reset_swap_buffers_flag() {
|
void DisplayServerAndroid::reset_swap_buffers_flag() {
|
||||||
|
|||||||
Reference in New Issue
Block a user