Fixed a silly bug that prevented libretro automatic model selection from functioning correctly.

This commit is contained in:
Lior Halphon 2018-01-31 23:58:17 +02:00
parent 95234036bb
commit f3c07f1f99

View File

@ -391,6 +391,7 @@ bool retro_load_game(const struct retro_game_info *info)
snprintf(retro_game_path, sizeof(retro_game_path), "%s", info->path); snprintf(retro_game_path, sizeof(retro_game_path), "%s", info->path);
auto_model = (info->path[strlen(info->path) - 1] & ~0x20) == 'C' ? MODEL_CGB : MODEL_DMG;
init_for_current_model(); init_for_current_model();
if (GB_load_rom(&gb,info->path)) { if (GB_load_rom(&gb,info->path)) {
@ -398,8 +399,6 @@ bool retro_load_game(const struct retro_game_info *info)
return false; return false;
} }
auto_model = (info->path[strlen(info->path) - 1] & ~0x20) == 'c' ? MODEL_CGB : MODEL_DMG;
bool yes = true; bool yes = true;
environ_cb(RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS, &yes); environ_cb(RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS, &yes);