Skip to content

Commit

Permalink
libretro: force autofire to fix netplay and tribomb
Browse files Browse the repository at this point in the history
  • Loading branch information
frranck committed Dec 23, 2020
1 parent fafe33d commit 277e7db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
8 changes: 2 additions & 6 deletions common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1273,16 +1273,12 @@ void mrboom_deal_with_autofire()
{
if (bombInCell(xPlayer(i), yPlayer(i)))
{
int input = i;
#ifdef __LIBSDL2__
input = getInputForPlayer(i);
#endif
log_debug("autofire p:%d i:%d ", i, getInputForPlayer(i));
mrboom_update_input(button_b, input, 0, false);
mrboom_update_input(button_b, getInputForPlayer(i), 0, false);
}
}
}
}
}
}
}

Expand Down
16 changes: 1 addition & 15 deletions libretro/retro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ static int level_select = -1;
static const struct retro_variable var_mrboom_teammode = { "mrboom-teammode", "Team mode; Selfie|Color|Sex|Skynet" };
static const struct retro_variable var_mrboom_nomonster = { "mrboom-nomonster", "Monsters; ON|OFF" };
static const struct retro_variable var_mrboom_levelselect = { "mrboom-levelselect", "Level select; Normal|Candy|Penguins|Pink|Jungle|Board|Soccer|Sky|Aliens|Random" };
static const struct retro_variable var_mrboom_autofire = { "mrboom-autofire", "Drop bomb autofire; OFF|ON" };
static const struct retro_variable var_mrboom_aspect = { "mrboom-aspect", "Aspect ratio; Native|4:3|16:9" };
static const struct retro_variable var_mrboom_musicvolume = { "mrboom-musicvolume", "Music volume; 100|0|5|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95" };
static const struct retro_variable var_mrboom_sfxvolume = { "mrboom-sfxvolume", "Sfx volume; 50|55|60|65|70|75|80|85|90|95|100|0|5|10|15|20|25|30|35|40|45" };
Expand Down Expand Up @@ -100,7 +99,6 @@ void retro_init(void)
vars_systems.push_back(&var_mrboom_teammode);
vars_systems.push_back(&var_mrboom_nomonster);
vars_systems.push_back(&var_mrboom_levelselect);
vars_systems.push_back(&var_mrboom_autofire);
vars_systems.push_back(&var_mrboom_aspect);
vars_systems.push_back(&var_mrboom_musicvolume);
vars_systems.push_back(&var_mrboom_sfxvolume);
Expand Down Expand Up @@ -494,18 +492,6 @@ static void check_variables(void)
level_select = -1;
}
}
var.key = var_mrboom_autofire.key;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var))
{
if (strcmp(var.value, "ON") == 0)
{
setAutofire(true);
}
else
{
setAutofire(false);
}
}
var.key = var_mrboom_aspect.key;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var))
{
Expand Down Expand Up @@ -578,7 +564,7 @@ void retro_run(void)

set_game_options();
update_input();
mrboom_deal_with_autofire();
//mrboom_deal_with_autofire();

mrboom_loop();
render_checkered();
Expand Down

0 comments on commit 277e7db

Please sign in to comment.