fix emulated model for slot 2

This commit is contained in:
radius 2018-01-31 23:21:29 -05:00
parent 457b3b3f06
commit 88dfb9a159

View File

@ -408,15 +408,15 @@ static void check_variables(bool link)
var.value = NULL; var.value = NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{ {
enum model new_model = model[0]; enum model new_model = model[1];
if (strcmp(var.value, "Game Boy") == 0) if (strcmp(var.value, "Game Boy") == 0)
new_model = MODEL_DMG; new_model = MODEL_DMG;
else if (strcmp(var.value, "Game Boy Color") == 0) else if (strcmp(var.value, "Game Boy Color") == 0)
new_model = MODEL_CGB; new_model = MODEL_CGB;
else if (strcmp(var.value, "Game Boy Advance") == 0) else if (strcmp(var.value, "Game Boy Advance") == 0)
new_model = MODEL_AGB; new_model = MODEL_AGB;
if (GB_is_inited(&gb[1]) && new_model != model[0]) { if (GB_is_inited(&gb[1]) && new_model != model[1]) {
model[0] = new_model; model[1] = new_model;
init_for_current_model(); init_for_current_model();
} }
} }