Fix possibly nonexistent dir `MainForm.ScreenshotAsMenuItem_Click`

This commit is contained in:
YoshiRulz 2025-05-31 04:17:53 +10:00
parent ecd694d66b
commit b0ffdd9073
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 1 additions and 0 deletions

View File

@ -487,6 +487,7 @@ namespace BizHawk.Client.EmuHawk
private void ScreenshotAsMenuItem_Click(object sender, EventArgs e) private void ScreenshotAsMenuItem_Click(object sender, EventArgs e)
{ {
var (dir, file) = $"{ScreenshotPrefix()}.{DateTime.Now:yyyy-MM-dd HH.mm.ss}.png".SplitPathToDirAndFile(); var (dir, file) = $"{ScreenshotPrefix()}.{DateTime.Now:yyyy-MM-dd HH.mm.ss}.png".SplitPathToDirAndFile();
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
var result = this.ShowFileSaveDialog( var result = this.ShowFileSaveDialog(
filter: ScreenshotsFSFilterSet, filter: ScreenshotsFSFilterSet,
initDir: dir, initDir: dir,