| 475 | }; |
| 476 | |
| 477 | DLDebugOutput * DLDebug_CreateFileOutput() |
| 478 | { |
| 479 | static u32 count = 0; |
| 480 | |
| 481 | IO::Filename dumpdir; |
| 482 | IO::Path::Combine(dumpdir, g_ROM.settings.GameName.c_str(), "DisplayLists"); |
| 483 | |
| 484 | IO::Filename filepath; |
| 485 | Dump_GetDumpDirectory(filepath, dumpdir); |
| 486 | |
| 487 | char filename[64]; |
| 488 | sprintf(filename, "dl%04d.txt", count++); |
| 489 | |
| 490 | IO::Path::Append(filepath, filename); |
| 491 | |
| 492 | DLDebugOutputFile * output = new DLDebugOutputFile(); |
| 493 | if (!output->Open(filepath)) |
| 494 | { |
| 495 | delete output; |
| 496 | DBGConsole_Msg(0, "RDP: Couldn't create dumpfile %s", filepath); |
| 497 | return nullptr; |
| 498 | } |
| 499 | |
| 500 | DBGConsole_Msg(0, "RDP: Dumping Display List as %s", filepath); |
| 501 | return output; |
| 502 | } |
| 503 | |
| 504 | |
| 505 | #endif // DAEDALUS_DEBUG_DISPLAYLIST |