From 34a92d859f9a45a7bc3832cb8d44b93055f04427 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 26 May 2009 15:20:57 +0000 Subject: [PATCH] win32 - record movie dialog - minor code cleanup --- desmume/src/windows/replay.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/desmume/src/windows/replay.cpp b/desmume/src/windows/replay.cpp index 94b81f9f4..908fe674e 100644 --- a/desmume/src/windows/replay.cpp +++ b/desmume/src/windows/replay.cpp @@ -90,7 +90,7 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP { static struct CreateMovieParameters* p = NULL; std::wstring author = L""; - std::string filename; //temp variable + std::string fname; int x; //temp vairable switch(uMsg) { @@ -102,7 +102,7 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP { case IDOK: { author = GetDlgItemTextW<500>(hwndDlg,IDC_EDIT_AUTHOR); - std::string fname = GetDlgItemText(hwndDlg,IDC_EDIT_FILENAME); + fname = GetDlgItemText(hwndDlg,IDC_EDIT_FILENAME); if (fname.length()) { FCEUI_SaveMovie(fname.c_str(), author); @@ -133,12 +133,12 @@ static BOOL CALLBACK RecordDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP GetSaveFileName(&ofn); //If user did not specify an extension, add .dsm for them - filename = szChoice; - x = filename.find_last_of("."); + fname = szChoice; + x = fname.find_last_of("."); if (x < 0) - filename.append(".dsm"); + fname.append(".dsm"); - SetDlgItemText(hwndDlg, IDC_EDIT_FILENAME, filename.c_str()); + SetDlgItemText(hwndDlg, IDC_EDIT_FILENAME, fname.c_str()); //if(GetSaveFileName(&ofn)) // UpdateRecordDialogPath(hwndDlg,szChoice);