| 443 | } |
| 444 | |
| 445 | void softgpu_browse(HWND hwnd) |
| 446 | { |
| 447 | static char bwpath[MAX_PATH] = ""; |
| 448 | |
| 449 | BROWSEINFOA bi; |
| 450 | memset(&bi, 0, sizeof(bi)); |
| 451 | bi.hwndOwner = hwnd; |
| 452 | bi.pszDisplayName = bwpath; |
| 453 | bi.lpszTitle = "Select install directory"; |
| 454 | bi.ulFlags = BIF_RETURNONLYFSDIRS; |
| 455 | |
| 456 | |
| 457 | PIDLIST_ABSOLUTE pl = SHBrowseForFolderA(&bi); |
| 458 | if(pl != NULL) |
| 459 | { |
| 460 | if(pathinput != INVALID_HANDLE_VALUE) |
| 461 | { |
| 462 | if(SHGetPathFromIDListA(pl, bwpath)) |
| 463 | { |
| 464 | size_t bwpath_len = strlen(bwpath); |
| 465 | if(bwpath_len) |
| 466 | { |
| 467 | if(bwpath[bwpath_len-1] != '\\') |
| 468 | { |
| 469 | strcat(bwpath, "\\"); |
| 470 | } |
| 471 | strcat(bwpath, "softgpu"); |
| 472 | SetWindowTextA(pathinput, bwpath); |
| 473 | } |
| 474 | } |
| 475 | } |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | int GetInputInt(HWND hwnd, int id) |
| 480 | { |