Jelajahi Sumber

the cleanup code I was going to add isn't necessary in this function, so just make gl_platform_init function return false

jp9000 12 tahun lalu
induk
melakukan
3add91aa35
1 mengubah file dengan 3 tambahan dan 6 penghapusan
  1. 3 6
      libobs-opengl/gl-windows.c

+ 3 - 6
libobs-opengl/gl-windows.c

@@ -207,16 +207,13 @@ bool gl_platform_init(struct gs_device *device, struct gs_init_data *info)
 	memset(device->plat, 0, sizeof(struct gl_platform));
 	memset(device->plat, 0, sizeof(struct gl_platform));
 
 
 	if (!gl_create_false_context(device->plat, info))
 	if (!gl_create_false_context(device->plat, info))
-		goto fail;
+		return false;
 
 
 	if (!gl_init_extensions())
 	if (!gl_init_extensions())
-		goto fail;
+		return false;
 
 
 	if (!gl_init_pixel_format(device->plat, info))
 	if (!gl_init_pixel_format(device->plat, info))
-		goto fail;
+		return false;
 
 
 	return true;
 	return true;
-
-fail:
-	return false;
 }
 }