win32 - record movie dialog - OK button doesn't work until user specifies a filename

This commit is contained in:
adelikat 2009-05-26 15:16:42 +00:00
parent 7253fe7775
commit aa8baf0686
1 changed files with 5 additions and 2 deletions

View File

@ -103,8 +103,11 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
case IDOK: {
author = GetDlgItemTextW<500>(hwndDlg,IDC_EDIT_AUTHOR);
std::string fname = GetDlgItemText<MAX_PATH>(hwndDlg,IDC_EDIT_FILENAME);
FCEUI_SaveMovie(fname.c_str(), author);
EndDialog(hwndDlg, 0);
if (fname.length())
{
FCEUI_SaveMovie(fname.c_str(), author);
EndDialog(hwndDlg, 0);
}
return true;
}