Pass global IGL to DisplayConfig (and then to RetroShaderChain)
This commit is contained in:
parent
b26aa2e893
commit
a34dde7c4f
|
@ -2283,7 +2283,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void DisplayConfigMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var window = new DisplayConfig(Config);
|
||||
using var window = new DisplayConfig(Config, GlobalWin.GL);
|
||||
if (window.ShowDialog().IsOk())
|
||||
{
|
||||
DisplayManager.RefreshUserShader();
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Bizware.BizwareGL;
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Client.Common.Filters;
|
||||
using BizHawk.Common;
|
||||
|
@ -11,13 +13,17 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
private readonly Config _config;
|
||||
|
||||
private readonly IGL _gl;
|
||||
|
||||
private string _pathSelection;
|
||||
|
||||
public bool NeedReset { get; set; }
|
||||
|
||||
public DisplayConfig(Config config)
|
||||
public DisplayConfig(Config config, IGL gl)
|
||||
{
|
||||
_config = config;
|
||||
_gl = gl;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
rbNone.Checked = _config.TargetDisplayFilter == 0;
|
||||
|
@ -265,7 +271,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
string errors = "";
|
||||
try
|
||||
{
|
||||
var filter = new RetroShaderChain(GlobalWin.GL, cgp, Path.GetDirectoryName(choice));
|
||||
var filter = new RetroShaderChain(_gl, cgp, Path.GetDirectoryName(choice));
|
||||
ok = filter.Available;
|
||||
errors = filter.Errors;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue