Handle init failures
This commit is contained in:
@@ -112,7 +112,13 @@ int main(int argc, char** argv)
|
||||
|
||||
GLuint list = gen_cubes();
|
||||
|
||||
lvrcInitRenderingEGL(compositor, gl.egl_display, gl.egl_context, gl.egl_surface);
|
||||
bool bCompositorInit = lvrcInitRenderingEGL(compositor, gl.egl_display, gl.egl_context, gl.egl_surface);
|
||||
|
||||
if (!bCompositorInit)
|
||||
{
|
||||
printf ("Could not create compositor\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int eye_w = hmd_w/2*OVERSAMPLE_SCALE;
|
||||
int eye_h = hmd_h*OVERSAMPLE_SCALE;
|
||||
@@ -123,6 +129,7 @@ int main(int argc, char** argv)
|
||||
|
||||
if (!bSwapChainInit)
|
||||
{
|
||||
printf ("Could not create swapchain\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user