add support for reshade 4.9.1

This commit is contained in:
Bitl 2021-08-13 11:00:05 -07:00
parent 6f71c68064
commit da3b537e96
1 changed files with 9 additions and 6 deletions

View File

@ -385,7 +385,8 @@ public class GlobalFuncs
foreach (DirectoryInfo dir in Dirs) foreach (DirectoryInfo dir in Dirs)
{ {
string fulldirpath = dir.FullName + @"\" + cfgname; string fulldirpath = dir.FullName + @"\" + cfgname;
string fulldllpath = dir.FullName + @"\opengl32.dll"; string dllfilename = "opengl32.dll";
string fulldllpath = dir.FullName + @"\" + dllfilename;
if (GlobalVars.UserConfiguration.ReShade) if (GlobalVars.UserConfiguration.ReShade)
{ {
@ -401,7 +402,7 @@ public class GlobalFuncs
if (!File.Exists(fulldllpath)) if (!File.Exists(fulldllpath))
{ {
FixedFileCopy(GlobalPaths.ConfigDirData + "\\opengl32.dll", fulldllpath, false); FixedFileCopy(GlobalPaths.ConfigDirData + "\\" + dllfilename, fulldllpath, false);
} }
} }
else else
@ -424,10 +425,11 @@ public class GlobalFuncs
INIFile ini = new INIFile(cfgpath); INIFile ini = new INIFile(cfgpath);
string section = "GENERAL"; string section = "GENERAL";
string section2 = "OVERLAY";
int FPS = GlobalVars.UserConfiguration.ReShadeFPSDisplay ? 1 : 0; int FPS = GlobalVars.UserConfiguration.ReShadeFPSDisplay ? 1 : 0;
ini.IniWriteValue(section, "ShowFPS", FPS.ToString()); ini.IniWriteValue(section2, "ShowFPS", FPS.ToString());
ini.IniWriteValue(section, "ShowFrameTime", FPS.ToString()); ini.IniWriteValue(section2, "ShowFrameTime", FPS.ToString());
int PerformanceMode = GlobalVars.UserConfiguration.ReShadePerformanceMode ? 1 : 0; int PerformanceMode = GlobalVars.UserConfiguration.ReShadePerformanceMode ? 1 : 0;
ini.IniWriteValue(section, "PerformanceMode", PerformanceMode.ToString()); ini.IniWriteValue(section, "PerformanceMode", PerformanceMode.ToString());
} }
@ -439,10 +441,11 @@ public class GlobalFuncs
INIFile ini = new INIFile(cfgpath); INIFile ini = new INIFile(cfgpath);
string section = "GENERAL"; string section = "GENERAL";
string section2 = "OVERLAY";
int FPS = GlobalVars.UserConfiguration.ReShadeFPSDisplay ? 1 : 0; int FPS = GlobalVars.UserConfiguration.ReShadeFPSDisplay ? 1 : 0;
framerate = ini.IniReadValue(section, "ShowFPS", FPS.ToString()); framerate = ini.IniReadValue(section2, "ShowFPS", FPS.ToString());
frametime = ini.IniReadValue(section, "ShowFrameTime", FPS.ToString()); frametime = ini.IniReadValue(section2, "ShowFrameTime", FPS.ToString());
int PerformanceMode = GlobalVars.UserConfiguration.ReShadePerformanceMode ? 1 : 0; int PerformanceMode = GlobalVars.UserConfiguration.ReShadePerformanceMode ? 1 : 0;
performance = ini.IniReadValue(section, "PerformanceMode", PerformanceMode.ToString()); performance = ini.IniReadValue(section, "PerformanceMode", PerformanceMode.ToString());