| 416 | //========================================================================== |
| 417 | |
| 418 | int FileSystem::CheckIfResourceFileLoaded (const char *name) noexcept |
| 419 | { |
| 420 | unsigned int i; |
| 421 | |
| 422 | if (strrchr (name, '/') != NULL) |
| 423 | { |
| 424 | for (i = 0; i < (unsigned)Files.size(); ++i) |
| 425 | { |
| 426 | if (stricmp (GetResourceFileFullName (i), name) == 0) |
| 427 | { |
| 428 | return i; |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | else |
| 433 | { |
| 434 | for (i = 0; i < (unsigned)Files.size(); ++i) |
| 435 | { |
| 436 | auto pth = ExtractBaseName(GetResourceFileName(i), true); |
| 437 | if (stricmp (pth.c_str(), name) == 0) |
| 438 | { |
| 439 | return i; |
| 440 | } |
| 441 | } |
| 442 | } |
| 443 | return -1; |
| 444 | } |
| 445 | |
| 446 | //========================================================================== |
| 447 | // |
no test coverage detected