Add confirmation modal when launching TAStudio during casual play

This commit is contained in:
YoshiRulz 2021-10-14 14:45:00 +10:00
parent 52715383c5
commit 97e030fcb8
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 7 additions and 2 deletions

View File

@ -1242,7 +1242,12 @@ namespace BizHawk.Client.EmuHawk
ShowMessageBox(owner: null, "Current core does not support input polling. TAStudio can't be used.");
return;
}
const int DONT_PROMPT_BEFORE_FRAME = 2 * 60 * 60; // 2 min @ 60 fps
if (!MovieSession.Movie.IsActive() && Emulator.Frame > DONT_PROMPT_BEFORE_FRAME // if playing casually (not recording) AND played for enough frames (prompting always would be annoying)...
&& !this.ModalMessageBox2("This will reload the rom without saving. Launch TAStudio anyway?", "Confirmation")) // ...AND user responds "No" to "Open TAStudio?", then cancel
{
return;
}
Tools.Load<TAStudio>();
}

View File

@ -346,7 +346,7 @@ namespace BizHawk.Client.EmuHawk
break;
case "TAStudio":
Tools.Load<TAStudio>();
TAStudioMenuItem_Click(null, null);
break;
case "ToolBox":
Tools.Load<ToolBox>();