浏览代码

libobs: Fix adapter index not getting applied to resets

Jim 2 年之前
父节点
当前提交
02d20e9f36
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      libobs/obs.c

+ 2 - 2
libobs/obs.c

@@ -477,8 +477,6 @@ 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");
@@ -1401,6 +1399,8 @@ int obs_reset_video(struct obs_video_info *ovi)
 		}
 	}
 
+	ovi->adapter = obs->video.adapter_index;
+
 	const char *scale_type_name = "";
 	switch (ovi->scale_type) {
 	case OBS_SCALE_DISABLE: