src/osd/winui/treeview.c
| r7101 | r7102 | |
| 304 | 304 | UINT i, jj, k; |
| 305 | 305 | BOOL b; |
| 306 | 306 | int nGames = driver_list_get_count(drivers); |
| 307 | | dprintf("ResetWhichGamesInFolders : %d [%d]\n",nGames,numFolders); |
| 307 | |
| 308 | 308 | for (i = 0; i < numFolders; i++) |
| 309 | 309 | { |
| 310 | 310 | LPTREEFOLDER lpFolder = treeFolders[i]; |
| r7101 | r7102 | |
| 1605 | 1605 | fExData->m_nIconId,dwFolderFlags)); |
| 1606 | 1606 | } |
| 1607 | 1607 | |
| 1608 | | dprintf("CreateAllChildFolders"); |
| 1609 | 1608 | CreateAllChildFolders(); |
| 1610 | | dprintf("CreateTreeIcons"); |
| 1611 | 1609 | CreateTreeIcons(); |
| 1612 | | dprintf("ResetWhichGamesInFolders"); |
| 1613 | 1610 | ResetWhichGamesInFolders(); |
| 1614 | | dprintf("ResetTreeViewFolders"); |
| 1615 | 1611 | ResetTreeViewFolders(); |
| 1616 | | dprintf("SelectTreeViewFolder"); |
| 1617 | 1612 | SelectTreeViewFolder(GetSavedFolderID()); |
| 1618 | | dprintf("LoadFolderFlags"); |
| 1619 | 1613 | LoadFolderFlags(); |
| 1620 | | dprintf("end of InitFolders"); |
| 1621 | 1614 | return TRUE; |
| 1622 | 1615 | } |
| 1623 | 1616 | |
src/mess/osd/winui/softwarepicker.c
| r7101 | r7102 | |
| 267 | 267 | { |
| 268 | 268 | if (!mame_stricmp(zipent->filename, pFileInfo->zip_entry_name)) |
| 269 | 269 | { |
| 270 | | pBuffer = (unsigned char *)malloc(zipent->uncompressed_length); |
| 270 | pBuffer = (unsigned char *)global_alloc_array_clear(unsigned char,zipent->uncompressed_length); |
| 271 | 271 | if (pBuffer) |
| 272 | 272 | { |
| 273 | 273 | ziperr = zip_file_decompress(zip, pBuffer, zipent->uncompressed_length); |
| r7101 | r7102 | |
| 397 | 397 | |
| 398 | 398 | // create the FileInfo structure |
| 399 | 399 | nSize = sizeof(file_info) + strlen(pszFilename); |
| 400 | | pInfo = (file_info *) malloc(nSize); |
| 400 | pInfo = (file_info *) global_alloc_array(UINT8,nSize); |
| 401 | 401 | if (!pInfo) |
| 402 | 402 | goto error; |
| 403 | 403 | memset(pInfo, 0, nSize); |
| r7101 | r7102 | |
| 423 | 423 | else |
| 424 | 424 | pInfo->base_name = pInfo->file_name; |
| 425 | 425 | |
| 426 | | ppNewIndex = (file_info**)malloc((pPickerInfo->file_index_length + 1) * sizeof(*pPickerInfo->file_index)); |
| 426 | ppNewIndex = (file_info**)global_alloc_array(UINT8,(pPickerInfo->file_index_length + 1) * sizeof(*pPickerInfo->file_index)); |
| 427 | 427 | memcpy(ppNewIndex,pPickerInfo->file_index,pPickerInfo->file_index_length * sizeof(*pPickerInfo->file_index)); |
| 428 | 428 | if (pPickerInfo->file_index) free(pPickerInfo->file_index); |
| 429 | 429 | if (!ppNewIndex) |
| r7101 | r7102 | |
| 534 | 534 | pPickerInfo = GetSoftwarePickerInfo(hwndPicker); |
| 535 | 535 | |
| 536 | 536 | nSearchInfoSize = sizeof(directory_search_info) + strlen(pszDirectory); |
| 537 | | pSearchInfo = (directory_search_info *)malloc(nSearchInfoSize); |
| 537 | pSearchInfo = (directory_search_info *)global_alloc_array(UINT8,nSearchInfoSize); |
| 538 | 538 | if (!pSearchInfo) |
| 539 | 539 | return FALSE; |
| 540 | 540 | memset(pSearchInfo, 0, nSearchInfoSize); |
| r7101 | r7102 | |
| 646 | 646 | pPickerInfo = GetSoftwarePickerInfo(hwndPicker); |
| 647 | 647 | |
| 648 | 648 | pSearchInfo = pPickerInfo->first_search_info; |
| 649 | |
| 649 | 650 | if (pSearchInfo) |
| 650 | 651 | { |
| 651 | 652 | // searching through directories |
| r7101 | r7102 | |
| 674 | 675 | SoftwarePicker_FreeSearchInfo(pSearchInfo); |
| 675 | 676 | } |
| 676 | 677 | } |
| 677 | | /* else if (pPickerInfo->config->hashfile && (pPickerInfo->hashes_realized |
| 678 | else if (pPickerInfo->config!= NULL && pPickerInfo->config->hashfile && (pPickerInfo->hashes_realized |
| 678 | 679 | < pPickerInfo->file_index_length)) |
| 679 | 680 | { |
| 680 | 681 | // time to realize some hashes |
| r7101 | r7102 | |
| 708 | 709 | pPickerInfo->hashes_realized++; |
| 709 | 710 | } |
| 710 | 711 | } |
| 711 | | }*/ |
| 712 | } |
| 712 | 713 | else |
| 713 | 714 | { |
| 714 | 715 | // we are done! |
| r7101 | r7102 | |
| 834 | 835 | |
| 835 | 836 | if (!SetupPicker(hwndPicker, pOptions)) |
| 836 | 837 | goto error; |
| 837 | | |
| 838 | | pPickerInfo = (software_picker_info *)malloc(sizeof(*pPickerInfo)); |
| 838 | pPickerInfo = (software_picker_info *)global_alloc_clear(software_picker_info); |
| 839 | 839 | if (!pPickerInfo) |
| 840 | 840 | goto error; |
| 841 | 841 | memset(pPickerInfo, 0, sizeof(*pPickerInfo)); |
| 842 | | |
| 843 | 842 | if (!SetProp(hwndPicker, software_picker_property_name, (HANDLE) pPickerInfo)) |
| 844 | 843 | goto error; |
| 845 | 844 | |