displaymanager-more resilience against empty user filter path
This commit is contained in:
parent
b9b8f0a04a
commit
f04210c5c9
|
@ -61,7 +61,7 @@ namespace BizHawk.Client.Common
|
|||
public int TargetScanlineFilterIntensity = 128; // choose between 0 and 256
|
||||
public int TargetDisplayFilter = 0;
|
||||
public int DispFinalFilter = 0;
|
||||
public string DispUserFilterPath = ".";
|
||||
public string DispUserFilterPath = "";
|
||||
public RecentFiles RecentRoms = new RecentFiles(8);
|
||||
public bool PauseWhenMenuActivated = true;
|
||||
public bool SaveWindowPosition = true;
|
||||
|
|
|
@ -130,10 +130,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (ShaderChain_user != null)
|
||||
ShaderChain_user.Dispose();
|
||||
var fi = new FileInfo(Global.Config.DispUserFilterPath);
|
||||
if (fi.Exists)
|
||||
if (File.Exists(Global.Config.DispUserFilterPath))
|
||||
{
|
||||
var fi = new FileInfo(Global.Config.DispUserFilterPath);
|
||||
using (var stream = fi.OpenRead())
|
||||
ShaderChain_user = new Filters.RetroShaderChain(GL, new Filters.RetroShaderPreset(stream), Path.GetDirectoryName(Global.Config.DispUserFilterPath));
|
||||
}
|
||||
}
|
||||
|
||||
FilterManager.FilterProgram BuildDefaultChain(Size chain_insize, Size chain_outsize)
|
||||
|
|
Loading…
Reference in New Issue