Fix EmuClientApi not being registered and merge CloseEmulator()s
fixesa74d657a2
,51a83193a
This commit is contained in:
parent
c53bda9235
commit
9d1dfd71a1
|
@ -46,9 +46,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
void ClearAutohold();
|
||||
|
||||
void CloseEmulator();
|
||||
|
||||
void CloseEmulatorWithCode(int exitCode);
|
||||
void CloseEmulator(int? exitCode = null);
|
||||
|
||||
void CloseRom();
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// <inheritdoc cref="IEmuClientApi.CloseEmulator"/>
|
||||
public static void CloseEmulator() => GlobalWin.ClientApi.CloseEmulator();
|
||||
|
||||
/// <inheritdoc cref="IEmuClientApi.CloseEmulatorWithCode"/>
|
||||
public static void CloseEmulatorWithCode(int exitCode) => GlobalWin.ClientApi.CloseEmulatorWithCode(exitCode);
|
||||
/// <inheritdoc cref="IEmuClientApi.CloseEmulator"/>
|
||||
public static void CloseEmulatorWithCode(int exitCode) => GlobalWin.ClientApi.CloseEmulator(exitCode);
|
||||
|
||||
/// <inheritdoc cref="IEmuClientApi.CloseRom"/>
|
||||
public static void CloseRom() => GlobalWin.ClientApi.CloseRom();
|
||||
|
|
|
@ -15,7 +15,7 @@ using BizHawk.Emulation.Cores.Sega.MasterSystem;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public class EmuClientApi : IEmuClientApi
|
||||
public sealed class EmuClientApi : IEmuClientApi
|
||||
{
|
||||
private List<Joypad> _allJoyPads;
|
||||
|
||||
|
@ -106,9 +106,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void ClearAutohold() => _mainForm.ClearHolds();
|
||||
|
||||
public void CloseEmulator() => _mainForm.CloseEmulator();
|
||||
|
||||
public void CloseEmulatorWithCode(int exitCode) => _mainForm.CloseEmulator(exitCode);
|
||||
public void CloseEmulator(int? exitCode = null) => _mainForm.CloseEmulator(exitCode);
|
||||
|
||||
public void CloseRom() => _mainForm.CloseRom();
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
[LuaMethodExample("client.exitCode( 0 );")]
|
||||
[LuaMethod("exitCode", "Closes the emulator and returns the provided code")]
|
||||
public void CloseEmulatorWithCode(int exitCode) => APIs.EmuClient.CloseEmulatorWithCode(exitCode);
|
||||
public void CloseEmulatorWithCode(int exitCode) => APIs.EmuClient.CloseEmulator(exitCode);
|
||||
|
||||
[LuaMethodExample("local inclibor = client.borderheight( );")]
|
||||
[LuaMethod("borderheight", "Gets the current height in pixels of the letter/pillarbox area (top side only) around the emu display surface, excluding the gameExtraPadding you've set. This function (the whole lot of them) should be renamed or refactored since the padding areas have got more complex.")]
|
||||
|
|
Loading…
Reference in New Issue