@@ -186,7 +186,7 @@ int MameUIVerifyRomSet(int game, bool choice)
186186}
187187
188188// Verifies the Sample set while calling SetSampleAuditResults
189- int MameUIVerifySampleSet (int game, int box )
189+ int MameUIVerifySampleSet (int game)
190190{
191191 driver_enumerator enumerator (MameUIGlobal (), driver_list::driver (game));
192192 enumerator.next ();
@@ -206,15 +206,15 @@ int MameUIVerifySampleSet(int game, int box)
206206
207207 // output the summary of the audit
208208 if (!summary_string.empty ())
209- DetailsPrintf (box , " %s" , summary_string.c_str ());
209+ DetailsPrintf (1 , " %s" , summary_string.c_str ());
210210
211211 SetSampleAuditResults (game, summary);
212212 return summary;
213213}
214214
215215static DWORD WINAPI AuditThreadProc (LPVOID hDlg)
216216{
217- char s[80 ] { };
217+ char s[80 ]{ };
218218
219219 while (!bCancel)
220220 {
@@ -329,7 +329,7 @@ INT_PTR CALLBACK GameAuditDialogProc(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lPa
329329
330330 if (DriverUsesSamples (rom_index))
331331 {
332- iStatus = MameUIVerifySampleSet (rom_index, 0 );
332+ iStatus = MameUIVerifySampleSet (rom_index);
333333 lpStatus = StatusString (iStatus);
334334 }
335335 else
@@ -348,7 +348,7 @@ INT_PTR CALLBACK GameAuditDialogProc(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lPa
348348static void ProcessNextRom ()
349349{
350350 int retval = 0 ;
351- TCHAR buffer[20 ] { };
351+ TCHAR buffer[20 ]{ };
352352
353353 retval = MameUIVerifyRomSet (rom_index, 1 );
354354 switch (retval)
@@ -386,9 +386,9 @@ static void ProcessNextRom()
386386static void ProcessNextSample ()
387387{
388388 int retval = 0 ;
389- TCHAR buffer[20 ] { };
389+ TCHAR buffer[20 ]{ };
390390
391- retval = MameUIVerifySampleSet (sample_index, 1 );
391+ retval = MameUIVerifySampleSet (sample_index);
392392
393393 switch (retval)
394394 {
@@ -429,33 +429,27 @@ static void ProcessNextSample()
429429
430430static void CLIB_DECL DetailsPrintf (int box, const char *fmt, ...)
431431{
432- // RS 20030613 Different Ids for Property Page and Dialog
433- // so see which one's currently instantiated
434- HWND hEdit = 0 ;
435- if (box == 0 )
432+ // This does the audit boxes for all systems and for an individual game.
433+ // See if it's all systems
434+ HWND hEdit = GetDlgItem (hAudit, IDC_AUDIT_DETAILS );
435+ // if not open, try individual game
436+ if (!hEdit)
436437 {
437- hEdit = GetDlgItem (hAudit, IDC_AUDIT_DETAILS );
438+ // if this system has separate boxes for samples, try that
439+ // otherwise all errors go into the roms box
440+ if (box)
441+ hEdit = GetDlgItem (hAudit, IDC_AUDIT_DETAILS_PROP1 );
438442 if (!hEdit)
439443 hEdit = GetDlgItem (hAudit, IDC_AUDIT_DETAILS_PROP0 );
440444 }
441- else
442- if (box == 1 )
443- {
444- hEdit = GetDlgItem (hAudit, IDC_AUDIT_DETAILS );
445- if (!hEdit)
446- hEdit = GetDlgItem (hAudit, IDC_AUDIT_DETAILS_PROP1 );
447- }
448445
446+ // Still nothing? Most likely doing an F5 audit, which has no boxes.
449447 if (!hEdit)
450- {
451- // Auditing via F5 - no window to display the results
452- // printf("audit detailsprintfsprintf() can't find any audit control\n");
453448 return ;
454- }
455449
456450 va_list marker;
457451 va_start (marker, fmt);
458- char s[8000 ] { };
452+ char s[8000 ]{ };
459453 vsnprintf (s, sizeof (s), fmt, marker);
460454 va_end (marker);
461455
0 commit comments