Initialize default_rect_effect only with OpenGL
Instead of limiting this to an apple-specific define, just limit it to OpenGL -- because this particular effect file cannot be used with Direct3D.
This commit is contained in:
parent
69fc9fb7fc
commit
76d538611a
20
libobs/obs.c
20
libobs/obs.c
@ -224,12 +224,12 @@ static int obs_init_graphics(struct obs_video_info *ovi)
|
||||
NULL);
|
||||
bfree(filename);
|
||||
|
||||
#ifdef __APPLE__
|
||||
filename = find_libobs_data_file("default_rect.effect");
|
||||
video->default_rect_effect = gs_effect_create_from_file(filename,
|
||||
NULL);
|
||||
bfree(filename);
|
||||
#endif
|
||||
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
|
||||
filename = find_libobs_data_file("default_rect.effect");
|
||||
video->default_rect_effect = gs_effect_create_from_file(
|
||||
filename, NULL);
|
||||
bfree(filename);
|
||||
}
|
||||
|
||||
filename = find_libobs_data_file("solid.effect");
|
||||
video->solid_effect = gs_effect_create_from_file(filename,
|
||||
@ -243,10 +243,10 @@ static int obs_init_graphics(struct obs_video_info *ovi)
|
||||
|
||||
if (!video->default_effect)
|
||||
success = false;
|
||||
#ifdef __APPLE__
|
||||
if (!video->default_rect_effect)
|
||||
success = false;
|
||||
#endif
|
||||
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
|
||||
if (!video->default_rect_effect)
|
||||
success = false;
|
||||
}
|
||||
if (!video->solid_effect)
|
||||
success = false;
|
||||
if (!video->conversion_effect)
|
||||
|
Loading…
x
Reference in New Issue
Block a user