DoFrameAdvance method in ApiHawk

This commit is contained in:
Hathor86 2016-03-23 23:05:05 +01:00
parent 7acbaffafd
commit f42c0d4a39
1 changed files with 10 additions and 7 deletions

View File

@ -12,6 +12,7 @@ namespace BizHawk.Client.ApiHawk
#region Fields #region Fields
private static readonly Assembly clientAssembly; private static readonly Assembly clientAssembly;
private static readonly object clientMainForm;
public static event EventHandler RomLoaded; public static event EventHandler RomLoaded;
@ -22,20 +23,22 @@ namespace BizHawk.Client.ApiHawk
static ClientApi() static ClientApi()
{ {
clientAssembly = Assembly.GetEntryAssembly(); clientAssembly = Assembly.GetEntryAssembly();
clientMainForm = clientAssembly.GetType("BizHawk.Client.EmuHawk.GlobalWin").GetField("MainForm").GetValue(null);
} }
#endregion #endregion
#region Methods #region Methods
/*public static void DoframeAdvance() /// <summary>
/// THE FrameAdvance stuff
/// </summary>
public static void DoframeAdvance()
{ {
//StepRunLoop_Core Type reflectClass = clientAssembly.GetType("BizHawk.Client.EmuHawk.MainForm");
Type emuLuaLib = clientAssembly.GetType("BizHawk.Client.EmuHawk.MainForm"); MethodInfo method = reflectClass.GetMethod("FrameAdvance");
//clientAssembly method.Invoke(clientMainForm, null);
MethodInfo paddingMethod = emuLuaLib.GetMethod("FrameAdvance"); }
paddingMethod.Invoke(paddingMethod, null);
}*/
/// <summary> /// <summary>
/// Raise when a rom is successfully Loaded /// Raise when a rom is successfully Loaded