Minor game detect refactoring

This commit is contained in:
mkrsym1
2023-08-10 01:00:24 +03:00
parent 0bfab4f682
commit e9d2130105
3 changed files with 21 additions and 11 deletions

View File

@ -78,9 +78,10 @@ void hsr_fill_data(struct game_data *buf) {
uint32_t crc = utils_file_crc32c(L"UnityPlayer.dll");
enum hsr_region id = HSR_INVALID;
for (size_t i = 0; i < sizeof(HSR_REGIONS) / sizeof(struct crc_region_pair); i++) {
for (size_t i = 0; i < UTILS_COUNT(HSR_REGIONS); i++) {
if (HSR_REGIONS[i].crc == crc) {
id = HSR_REGIONS[i].id;
break;
}
}