| 32 | void RefreshThrottleFPS(); |
| 33 | |
| 34 | static char* GetReplayPath(HWND hwndDlg) |
| 35 | { |
| 36 | char* fn=0; |
| 37 | char szChoice[MAX_PATH]; |
| 38 | |
| 39 | LONG lIndex = SendDlgItemMessage(hwndDlg, IDC_COMBO_FILENAME, CB_GETCURSEL, 0, 0); |
| 40 | LONG lCount = SendDlgItemMessage(hwndDlg, IDC_COMBO_FILENAME, CB_GETCOUNT, 0, 0); |
| 41 | |
| 42 | // NOTE: lCount-1 is the "Browse..." list item |
| 43 | if(lIndex != CB_ERR && lIndex != lCount-1) |
| 44 | { |
| 45 | LONG lStringLength = SendDlgItemMessage(hwndDlg, IDC_COMBO_FILENAME, CB_GETLBTEXTLEN, (WPARAM)lIndex, 0); |
| 46 | if(lStringLength < MAX_PATH) |
| 47 | { |
| 48 | char szDrive[MAX_PATH]={0}; |
| 49 | char szDirectory[MAX_PATH]={0}; |
| 50 | char szFilename[MAX_PATH]={0}; |
| 51 | char szExt[MAX_PATH]={0}; |
| 52 | char szTemp[MAX_PATH]={0}; |
| 53 | |
| 54 | SendDlgItemMessage(hwndDlg, IDC_COMBO_FILENAME, CB_GETLBTEXT, (WPARAM)lIndex, (LPARAM)szTemp); |
| 55 | if(szTemp[0] && szTemp[1]!=':') |
| 56 | sprintf(szChoice, ".\\%s", szTemp); |
| 57 | else |
| 58 | strcpy(szChoice, szTemp); |
| 59 | |
| 60 | SetCurrentDirectory(BaseDirectory.c_str()); |
| 61 | |
| 62 | _splitpath(szChoice, szDrive, szDirectory, szFilename, szExt); |
| 63 | if(szDrive[0]=='\0' && szDirectory[0]=='\0') |
| 64 | fn=strdup(FCEU_MakePath(FCEUMKF_MOVIE, szChoice).c_str()); // need to make a full path |
| 65 | else |
| 66 | fn=strdup(szChoice); // given a full path |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | return fn; |
| 71 | } |
| 72 | |
| 73 | static std::string GetRecordPath(HWND hwndDlg) |
| 74 | { |
no test coverage detected