You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Harmonize return values of window_create() in rendering drivers
This commit is contained in:
@@ -40,7 +40,7 @@ const char *VulkanContextAndroid::_get_platform_surface_extension() const {
|
||||
return VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
|
||||
}
|
||||
|
||||
int VulkanContextAndroid::window_create(ANativeWindow *p_window, DisplayServer::VSyncMode p_vsync_mode, int p_width, int p_height) {
|
||||
Error VulkanContextAndroid::window_create(ANativeWindow *p_window, DisplayServer::VSyncMode p_vsync_mode, int p_width, int p_height) {
|
||||
VkAndroidSurfaceCreateInfoKHR createInfo;
|
||||
createInfo.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR;
|
||||
createInfo.pNext = nullptr;
|
||||
@@ -50,7 +50,7 @@ int VulkanContextAndroid::window_create(ANativeWindow *p_window, DisplayServer::
|
||||
VkSurfaceKHR surface;
|
||||
VkResult err = vkCreateAndroidSurfaceKHR(get_instance(), &createInfo, nullptr, &surface);
|
||||
if (err != VK_SUCCESS) {
|
||||
ERR_FAIL_V_MSG(-1, "vkCreateAndroidSurfaceKHR failed with error " + itos(err));
|
||||
ERR_FAIL_V_MSG(ERR_CANT_CREATE, "vkCreateAndroidSurfaceKHR failed with error " + itos(err));
|
||||
}
|
||||
|
||||
return _window_create(DisplayServer::MAIN_WINDOW_ID, p_vsync_mode, surface, p_width, p_height);
|
||||
|
||||
Reference in New Issue
Block a user