Lua Console - hook up recent lua menu items, and start lua session file loading

This commit is contained in:
andres.delikat 2012-01-22 23:03:43 +00:00
parent defbe971c4
commit d4260e22b1
2 changed files with 23 additions and 2 deletions

View File

@ -243,7 +243,7 @@ namespace BizHawk.MultiClient
public void memory_writebyte(object lua_input)
{
Global.Emulator.MainMemory.PokeByte((int)lua_input, (byte)lua_input);
Global.Emulator.MemoryDomains[CurrentMemoryDomain].PokeByte((int)lua_input, (byte)lua_input);
}
//----------------------------------------------------

View File

@ -450,7 +450,7 @@ namespace BizHawk.MultiClient
private void LoadLuaFromRecent(string path)
{
LoadLuaFile(path);
}
private void LuaConsole_DragDrop(object sender, DragEventArgs e)
@ -569,6 +569,27 @@ namespace BizHawk.MultiClient
MessageBox.Show(LuaImp.LuaLibraryList);
}
private bool LoadLuaSession(string path)
{
var file = new FileInfo(path);
if (file.Exists == false) return false;
using (StreamReader sr = file.OpenText())
{
int count = 0;
string s = "";
string temp = "";
while ((s = sr.ReadLine()) != null)
{
//.luases
if (s.Length < 1) continue;
temp = s.Substring(0, 1) //Get enabled flag
}
}
return true;
}
}
}