| 503 | } |
| 504 | |
| 505 | INT_PTR CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| 506 | { |
| 507 | switch(uMsg) |
| 508 | { |
| 509 | case WM_INITDIALOG: |
| 510 | { |
| 511 | SendDlgItemMessage(hwndDlg, IDC_CHECK_READONLY, BM_SETCHECK, replayReadOnlySetting?BST_CHECKED:BST_UNCHECKED, 0); |
| 512 | SendDlgItemMessage(hwndDlg, IDC_CHECK_STOPMOVIE,BM_SETCHECK, BST_UNCHECKED, 0); |
| 513 | |
| 514 | #define NUM_OF_MOVIEGLOB_PATHS 1 |
| 515 | |
| 516 | char* findGlob[NUM_OF_MOVIEGLOB_PATHS] = {strdup(FCEU_MakeFName(FCEUMKF_MOVIEGLOB, 0, 0).c_str())}; |
| 517 | |
| 518 | int items=0; |
| 519 | |
| 520 | for(int j = 0;j < NUM_OF_MOVIEGLOB_PATHS; j++) |
| 521 | { |
| 522 | char* temp=0; |
| 523 | do { |
| 524 | temp=strchr(findGlob[j],'/'); |
| 525 | if(temp) |
| 526 | *temp = '\\'; |
| 527 | } while(temp); |
| 528 | |
| 529 | // disabled because... apparently something is case sensitive?? |
| 530 | // for(i=1;i<strlen(findGlob[j]);i++) |
| 531 | // findGlob[j][i] = tolower(findGlob[j][i]); |
| 532 | } |
| 533 | |
| 534 | for(int j = 0;j < NUM_OF_MOVIEGLOB_PATHS; j++) |
| 535 | { |
| 536 | // if the two directories are the same, only look through one of them to avoid adding everything twice |
| 537 | if(j==1 && !strnicmp(findGlob[0],findGlob[1],MAX(strlen(findGlob[0]),strlen(findGlob[1]))-6)) |
| 538 | continue; |
| 539 | |
| 540 | char globBase[512]; |
| 541 | strcpy(globBase,findGlob[j]); |
| 542 | globBase[strlen(globBase)-5]='\0'; |
| 543 | |
| 544 | //char szFindPath[512]; //mbg merge 7/17/06 removed |
| 545 | WIN32_FIND_DATA wfd; |
| 546 | HANDLE hFind; |
| 547 | |
| 548 | memset(&wfd, 0, sizeof(wfd)); |
| 549 | hFind = FindFirstFile(findGlob[j], &wfd); |
| 550 | if(hFind != INVALID_HANDLE_VALUE) |
| 551 | { |
| 552 | do |
| 553 | { |
| 554 | if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) |
| 555 | continue; |
| 556 | |
| 557 | //TODO - a big copy/pasted block below. factor out extension extractor or use another one |
| 558 | |
| 559 | // filter out everything that's not an extension we like (*.fm2 and *.fm3) |
| 560 | // (because FindFirstFile is too dumb to do that) |
| 561 | { |
| 562 | std::string ext = getExtension(wfd.cFileName); |
nothing calls this directly
no test coverage detected