| 349 | } |
| 350 | |
| 351 | void SystemContentLoadParamSfo(const String& file_name) |
| 352 | { |
| 353 | auto* sc = Core::Singleton<SystemContent>::Instance(); |
| 354 | |
| 355 | if (!Core::File::IsFileExisting(file_name)) |
| 356 | { |
| 357 | EXIT("Can't find file: %s\n", file_name.C_Str()); |
| 358 | } |
| 359 | |
| 360 | sc->psf.Open(file_name); |
| 361 | |
| 362 | if (!sc->psf.IsValid()) |
| 363 | { |
| 364 | EXIT("invalid file: %s\n", file_name.C_Str()); |
| 365 | } |
| 366 | |
| 367 | sc->psf_path = file_name; |
| 368 | sc->psf.DbgPrint(); |
| 369 | |
| 370 | sc->icon_path = file_name.DirectoryWithoutFilename() + U"icon0.png"; |
| 371 | delete sc->icon; |
| 372 | |
| 373 | if (Core::File::IsFileExisting(sc->icon_path)) |
| 374 | { |
| 375 | sc->icon = new Libs::Graphics::Image(sc->icon_path); |
| 376 | sc->icon->Load(); |
| 377 | } else |
| 378 | { |
| 379 | sc->icon = nullptr; |
| 380 | } |
| 381 | |
| 382 | sc->playgo_path = file_name.DirectoryWithoutFilename() + U"playgo-chunk.dat"; |
| 383 | sc->playgo.Open(sc->playgo_path); |
| 384 | |
| 385 | if (sc->playgo.IsValid()) |
| 386 | { |
| 387 | sc->playgo.DbgPrint(); |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | bool SystemContentParamSfoGetInt(const char* name, int32_t* value) |
| 392 | { |
no test coverage detected