active controls should be set to a null emulator as an option too (this still doesn't fix the crash on load though as it never gets to the code that sets active controls because that is triggered by the loading of a ROM)
This commit is contained in:
parent
3ac209217c
commit
a5bf181621
|
@ -7,7 +7,7 @@ namespace BizHawk
|
|||
public class NullEmulator : IEmulator, IVideoProvider, ISoundProvider
|
||||
{
|
||||
public string SystemId { get { return "NULL"; } }
|
||||
private static readonly ControllerDefinition NullController = new ControllerDefinition { Name = "Null Controller" };
|
||||
public static readonly ControllerDefinition NullController = new ControllerDefinition { Name = "Null Controller" };
|
||||
|
||||
private int[] frameBuffer = new int[256 * 192];
|
||||
private Random rand = new Random();
|
||||
|
|
|
@ -20,5 +20,6 @@ namespace BizHawk.MultiClient
|
|||
public static Controller TI83Controls;
|
||||
public static Controller NESControls;
|
||||
public static Controller ActiveController;
|
||||
public static Controller NullControls;
|
||||
}
|
||||
}
|
|
@ -329,6 +329,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
Global.ClientControls = controls;
|
||||
|
||||
|
||||
Global.NullControls = new Controller(NullEmulator.NullController);
|
||||
|
||||
var smsControls = new Controller(SMS.SmsController);
|
||||
smsControls.BindMulti("Reset", Global.Config.SmsReset);
|
||||
smsControls.BindMulti("Pause", Global.Config.SmsPause);
|
||||
|
@ -529,6 +532,7 @@ namespace BizHawk.MultiClient
|
|||
case "GB":
|
||||
break;
|
||||
default:
|
||||
Global.ActiveController = Global.NullControls;
|
||||
break;
|
||||
}
|
||||
Global.Emulator.Controller = Global.ActiveController;
|
||||
|
|
Loading…
Reference in New Issue