fix regression in libretro core loading and streamline open advanced libretro ui
This commit is contained in:
parent
1e878f700c
commit
59048264cd
|
@ -1185,7 +1185,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
ThrottleMessage();
|
||||
}
|
||||
|
||||
public void RunLibretroCoreChooser()
|
||||
public bool RunLibretroCoreChooser()
|
||||
{
|
||||
var ofd = new OpenFileDialog();
|
||||
|
||||
|
@ -1203,9 +1203,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
ofd.Filter = "Libretro Cores (*.dll)|*.dll";
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.Cancel)
|
||||
return;
|
||||
return false;
|
||||
|
||||
Global.Config.LibretroCore = ofd.FileName;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setLibretroCoreToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -51,8 +51,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void btnSetLibretroCore_Click(object sender, EventArgs e)
|
||||
{
|
||||
mainForm.RunLibretroCoreChooser();
|
||||
RefreshLibretroCore(false);
|
||||
if(mainForm.RunLibretroCoreChooser())
|
||||
RefreshLibretroCore(false);
|
||||
}
|
||||
|
||||
LibRetroEmulator.RetroDescription CurrentDescription;
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace BizHawk.Common
|
|||
var envpath = Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process);
|
||||
try
|
||||
{
|
||||
string envpath_new = Path.GetDirectoryName(path) + ";" + envpath;
|
||||
string envpath_new = Path.GetDirectoryName(dllPath) + ";" + envpath;
|
||||
Environment.SetEnvironmentVariable("PATH", envpath_new, EnvironmentVariableTarget.Process);
|
||||
_hModule = LoadLibrary(path); //consider using LoadLibraryEx instead of shenanigans?
|
||||
var newfname = TempFileCleaner.RenameTempFilenameForDelete(path);
|
||||
|
|
Loading…
Reference in New Issue