|
|
@@ -255,6 +255,8 @@ static void *display_capture_create(obs_data_t *settings, obs_source_t *source)
|
|
|
dc->source = source;
|
|
|
dc->hide_cursor = !obs_data_get_bool(settings, "show_cursor");
|
|
|
|
|
|
+ obs_enter_graphics();
|
|
|
+
|
|
|
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
|
|
|
dc->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
|
|
|
} else {
|
|
|
@@ -264,8 +266,6 @@ static void *display_capture_create(obs_data_t *settings, obs_source_t *source)
|
|
|
if (!dc->effect)
|
|
|
goto fail;
|
|
|
|
|
|
- obs_enter_graphics();
|
|
|
-
|
|
|
struct gs_sampler_info info = {
|
|
|
.filter = GS_FILTER_LINEAR,
|
|
|
.address_u = GS_ADDRESS_CLAMP,
|