1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Wayland: Fix missing error reporting

This commit is contained in:
Camilla Löwy 2022-06-14 22:28:05 +02:00
parent 5002522f73
commit 9ad9f5c52a

View File

@ -672,7 +672,10 @@ static GLFWbool createNativeSurface(_GLFWwindow* window,
{ {
window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor); window->wl.surface = wl_compositor_create_surface(_glfw.wl.compositor);
if (!window->wl.surface) if (!window->wl.surface)
{
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: Failed to create window surface");
return GLFW_FALSE; return GLFW_FALSE;
}
wl_surface_add_listener(window->wl.surface, wl_surface_add_listener(window->wl.surface,
&surfaceListener, &surfaceListener,
@ -684,7 +687,10 @@ static GLFWbool createNativeSurface(_GLFWwindow* window,
wndconfig->width, wndconfig->width,
wndconfig->height); wndconfig->height);
if (!window->wl.egl.window) if (!window->wl.egl.window)
{
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: Failed to create EGL window");
return GLFW_FALSE; return GLFW_FALSE;
}
window->wl.width = wndconfig->width; window->wl.width = wndconfig->width;
window->wl.height = wndconfig->height; window->wl.height = wndconfig->height;