src/osd/winui/mui_audit.c
| r11231 | r11232 | |
| 149 | 149 | /*************************************************************************** |
| 150 | 150 | Internal functions |
| 151 | 151 | ***************************************************************************/ |
| 152 | | /* |
| 153 | | static void MameUIOutput(void *param, const char *format, va_list argptr) |
| 154 | | { |
| 155 | | char buffer[512]; |
| 156 | | vsnprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), format, argptr); |
| 157 | | DetailsPrintf("%s", buffer); |
| 158 | | } |
| 159 | | */ |
| 160 | | /*static int ProcessAuditResults(int game, audit_record *audit, int audit_records) |
| 161 | | { |
| 162 | | output_callback_func prevcb; |
| 163 | | void *prevparam; |
| 164 | | int res; |
| 165 | | |
| 166 | | mame_set_output_channel(OUTPUT_CHANNEL_INFO, MameUIOutput, NULL, &prevcb, &prevparam); |
| 167 | | res = TRUE;//audit_summary(&driver_list::driver(game), audit_records, audit, TRUE); |
| 168 | | mame_set_output_channel(OUTPUT_CHANNEL_INFO, prevcb ? prevcb : mame_null_output_callback, prevparam, NULL, NULL); |
| 169 | | |
| 170 | | return res; |
| 171 | | }*/ |
| 172 | | |
| 173 | 152 | // Verifies the ROM set while calling SetRomAuditResults |
| 174 | 153 | int MameUIVerifyRomSet(int game) |
| 175 | 154 | { |
| 176 | | |
| 177 | | //audit_record *audit; |
| 178 | | //int audit_records; |
| 179 | | //int res; |
| 180 | | |
| 181 | | // perform the audit |
| 182 | | //audit_records = audit_images(MameUIGlobal(), &driver_list::driver(game), AUDIT_VALIDATE_FAST, &audit); |
| 183 | | //res = ProcessAuditResults(game, audit, audit_records); |
| 184 | | //if (audit_records > 0) |
| 185 | | // global_free(audit); |
| 186 | | |
| 187 | | // SetRomAuditResults(game, res); |
| 188 | | // return res; |
| 189 | | return TRUE; |
| 155 | driver_enumerator enumerator(MameUIGlobal(), driver_list::driver(game)); |
| 156 | enumerator.next(); |
| 157 | media_auditor auditor(enumerator); |
| 158 | media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); |
| 159 | |
| 160 | // output the summary of the audit |
| 161 | astring summary_string; |
| 162 | auditor.summarize(&summary_string); |
| 163 | DetailsPrintf("%s", summary_string.cstr()); |
| 164 | |
| 165 | SetRomAuditResults(game, summary); |
| 166 | return summary; |
| 190 | 167 | } |
| 191 | 168 | |
| 192 | 169 | // Verifies the Sample set while calling SetSampleAuditResults |
| 193 | 170 | int MameUIVerifySampleSet(int game) |
| 194 | 171 | { |
| 195 | | // audit_record *audit; |
| 196 | | // int audit_records; |
| 197 | | // int res; |
| 198 | | |
| 199 | | // perform the audit |
| 200 | | //audit_records = audit_samples(MameUIGlobal(), &driver_list::driver(game), &audit); |
| 201 | | // res = ProcessAuditResults(game, audit, audit_records); |
| 202 | | // if (audit_records > 0) |
| 203 | | // global_free(audit); |
| 204 | | |
| 205 | | //SetSampleAuditResults(game, res); |
| 206 | | //return res; |
| 207 | | return TRUE; |
| 172 | driver_enumerator enumerator(MameUIGlobal(), driver_list::driver(game)); |
| 173 | enumerator.next(); |
| 174 | media_auditor auditor(enumerator); |
| 175 | media_auditor::summary summary = auditor.audit_samples(); |
| 176 | |
| 177 | // output the summary of the audit |
| 178 | astring summary_string; |
| 179 | auditor.summarize(&summary_string); |
| 180 | DetailsPrintf("%s", summary_string.cstr()); |
| 181 | |
| 182 | SetSampleAuditResults(game, summary); |
| 183 | return summary; |
| 208 | 184 | } |
| 209 | 185 | |
| 210 | 186 | static DWORD WINAPI AuditThreadProc(LPVOID hDlg) |