|
@@ -462,6 +462,8 @@ static int obs_init_graphics(struct obs_video_info *ovi)
|
|
|
bool success = true;
|
|
|
int errorcode;
|
|
|
|
|
|
+ video->adapter_index = ovi->adapter;
|
|
|
+
|
|
|
errorcode =
|
|
|
gs_create(&video->graphics, ovi->graphics_module, ovi->adapter);
|
|
|
if (errorcode != GS_SUCCESS) {
|
|
@@ -475,6 +477,8 @@ static int obs_init_graphics(struct obs_video_info *ovi)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ ovi->adapter = video->adapter_index;
|
|
|
+
|
|
|
gs_enter_context(video->graphics);
|
|
|
|
|
|
char *filename = obs_find_data_file("default.effect");
|
|
@@ -3088,3 +3092,12 @@ bool obs_weak_object_references_object(obs_weak_object_t *weak,
|
|
|
{
|
|
|
return weak && object && weak->object == object;
|
|
|
}
|
|
|
+
|
|
|
+/* this function is a hack for the annoying intel igpu + dgpu situation. I
|
|
|
+ * guess. I don't care anymore. */
|
|
|
+EXPORT void obs_internal_set_adapter_idx_this_is_dumb(uint32_t adapter_idx)
|
|
|
+{
|
|
|
+ if (!obs)
|
|
|
+ return;
|
|
|
+ obs->video.adapter_index = adapter_idx;
|
|
|
+}
|