diff --git a/plugins/GSdx/GSCapture.cpp b/plugins/GSdx/GSCapture.cpp index 5aeede9b09..6a612e4919 100644 --- a/plugins/GSdx/GSCapture.cpp +++ b/plugins/GSdx/GSCapture.cpp @@ -417,11 +417,24 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float GSCaptureDlg dlg; - if(IDOK != dlg.DoModal()) return false; + if (IDOK != dlg.DoModal()) + return false; m_size.x = (dlg.m_width + 7) & ~7; m_size.y = (dlg.m_height + 7) & ~7; + { + int start = dlg.m_filename.length() - 4; + if (start > 0) + { + std::string test = dlg.m_filename.substr(start); + std::transform(test.begin(), test.end(), test.begin(), tolower); + if (test.compare(".avi") != 0) + dlg.m_filename += ".avi"; + } + else + dlg.m_filename += ".avi"; + } std::wstring fn{dlg.m_filename.begin(), dlg.m_filename.end()}; // diff --git a/plugins/GSdx/Window/GSCaptureDlg.cpp b/plugins/GSdx/Window/GSCaptureDlg.cpp index b48393e58f..964b7c1cf9 100644 --- a/plugins/GSdx/Window/GSCaptureDlg.cpp +++ b/plugins/GSdx/Window/GSCaptureDlg.cpp @@ -155,6 +155,11 @@ bool GSCaptureDlg::OnCommand(HWND hWnd, UINT id, UINT code) { switch (id) { + case IDC_FILENAME: + { + EnableWindow(GetDlgItem(m_hWnd, IDOK), GetText(IDC_FILENAME).length() != 0); + return false; + } case IDC_BROWSE: { if (code == BN_CLICKED)