Previous 15994 Revisions Next

r11232 Monday 18th April, 2011 at 13:49:53 UTC by Miodrag Milanović
WINUI - fixed updated ROM/sample audit code (no whatsnew)
[src/osd/winui]mui_audit.c

src/osd/winui/mui_audit.c
r11231r11232
149149/***************************************************************************
150150    Internal functions
151151 ***************************************************************************/
152/*
153static 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
173152// Verifies the ROM set while calling SetRomAuditResults   
174153int MameUIVerifyRomSet(int game)
175154{
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;
189return 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;
190167}
191168
192169// Verifies the Sample set while calling SetSampleAuditResults   
193170int MameUIVerifySampleSet(int game)
194171{
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;
208184}
209185
210186static DWORD WINAPI AuditThreadProc(LPVOID hDlg)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team