mirror of
https://github.com/libretro/Mesen.git
synced 2025-03-03 22:07:10 +00:00
Debugger: Lua - Fixed incorrect path for getScriptDataFolder for built-in scripts
This commit is contained in:
parent
eb1f120539
commit
4906b12e2f
@ -26,6 +26,7 @@ namespace Mesen.GUI.Debugger
|
||||
private DateTime _lastTimestamp = DateTime.MinValue;
|
||||
private AutocompleteMenu _popupMenu;
|
||||
private string _originalText = "";
|
||||
private string _builtInScriptName = null;
|
||||
|
||||
public frmScript(bool forceBlank = false)
|
||||
{
|
||||
@ -219,6 +220,7 @@ namespace Mesen.GUI.Debugger
|
||||
this.Text = $"{name} - Script Window";
|
||||
txtScriptContent.Text = ResourceManager.ReadZippedResource(name);
|
||||
_originalText = txtScriptContent.Text;
|
||||
_builtInScriptName = name;
|
||||
txtScriptContent.ClearUndo();
|
||||
}
|
||||
|
||||
@ -266,6 +268,8 @@ namespace Mesen.GUI.Debugger
|
||||
{
|
||||
if(_filePath != null) {
|
||||
return Path.GetFileName(_filePath);
|
||||
} else if(_builtInScriptName != null) {
|
||||
return _builtInScriptName;
|
||||
} else {
|
||||
return "unnamed.lua";
|
||||
}
|
||||
@ -320,6 +324,7 @@ namespace Mesen.GUI.Debugger
|
||||
ConfigManager.Config.DebugInfo.AddRecentScript(sfd.FileName);
|
||||
UpdateRecentScripts();
|
||||
_originalText = txtScriptContent.Text;
|
||||
_builtInScriptName = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user