FIxed Get/Set mneomnics to not break on null emulator, refactored the drag and drop for movies to allow the user to continue if they decline to open a rom from the open rom pop up

This commit is contained in:
adelikat 2012-03-03 18:24:34 +00:00
parent 3bfe716952
commit e3b3879954
2 changed files with 6 additions and 4 deletions

View File

@ -753,13 +753,10 @@ namespace BizHawk.MultiClient
else if (MovieImport.IsValidMovieExtension(Path.GetExtension(filePaths[0])))
{
if (CurrentlyOpenRom == null)
{
OpenROM();
if (CurrentlyOpenRom == null)
return;
}
else
LoadRom(CurrentlyOpenRom);
string errorMsg = "";
string warningMsg = "";
Movie m = MovieImport.ImportFile(filePaths[0], out errorMsg, out warningMsg);

View File

@ -172,6 +172,9 @@ namespace BizHawk.MultiClient
public string GetControllersAsMnemonic()
{
if (Global.Emulator.SystemId == "NULL")
return "|.|";
StringBuilder input = new StringBuilder("|");
if (ControlType == "Gameboy Controller")
@ -374,6 +377,8 @@ namespace BizHawk.MultiClient
/// </summary>
public void SetControllersAsMnemonic(string mnemonic)
{
if (Global.Emulator.SystemId == "NULL")
return;
MnemonicChecker c = new MnemonicChecker(mnemonic);
MyBoolButtons.Clear();