| 98 | } |
| 99 | |
| 100 | static char* GetSavePath(HWND hwndDlg) |
| 101 | { |
| 102 | char* fn=0; |
| 103 | char szDrive[MAX_PATH]={0}; |
| 104 | char szDirectory[MAX_PATH]={0}; |
| 105 | char szFilename[MAX_PATH]={0}; |
| 106 | char szExt[MAX_PATH]={0}; |
| 107 | LONG lIndex = SendDlgItemMessage(hwndDlg, IDC_COMBO_RECORDFROM, CB_GETCURSEL, 0, 0); |
| 108 | LONG lStringLength = SendDlgItemMessage(hwndDlg, IDC_COMBO_RECORDFROM, CB_GETLBTEXTLEN, (WPARAM)lIndex, 0); |
| 109 | |
| 110 | fn = (char*)malloc(lStringLength+1); //CB_GETLBTEXTLEN doesn't include NULL terminator. |
| 111 | SendDlgItemMessage(hwndDlg, IDC_COMBO_RECORDFROM, CB_GETLBTEXT, (WPARAM)lIndex, (LPARAM)fn); |
| 112 | |
| 113 | _splitpath(fn, szDrive, szDirectory, szFilename, szExt); |
| 114 | if(szDrive[0]=='\0' && szDirectory[0]=='\0') |
| 115 | { |
| 116 | char* newfn=strdup(FCEU_MakePath(FCEUMKF_STATE, fn).c_str()); // need to make a full path |
| 117 | free(fn); |
| 118 | fn=newfn; |
| 119 | } |
| 120 | |
| 121 | return fn; |
| 122 | } |
| 123 | |
| 124 | void UpdateReplayCommentsSubs(const char * fname) { |
| 125 |
no test coverage detected