Skip to content

Commit

Permalink
[libretro] Fix initialization of Light Phaser
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius authored Dec 28, 2024
1 parent d25c90e commit 90ed9b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platforms/libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
}

input_device[port] = device;
core->EnablePhaser(false);

switch ( device )
{
Expand All @@ -194,6 +195,8 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
break;
case RETRO_DEVICE_LIGHT_PHASER:
log_cb(RETRO_LOG_INFO, "Controller %u: Light Phaser\n", port);
if (port == 0)
core->EnablePhaser(true);
break;
default:
log_cb(RETRO_LOG_DEBUG, "Setting descriptors for unsupported device.\n");
Expand Down Expand Up @@ -300,8 +303,6 @@ bool retro_load_game(const struct retro_game_info *info)
log_cb(RETRO_LOG_INFO, "Cartridge Header: %s\n", cart->IsValidROM() ? "VALID" : "FAILED");
log_cb(RETRO_LOG_INFO, "Battery: %s\n", core->GetMemory()->GetCurrentRule()->PersistedRAM() ? "YES" : "NO");

core->EnablePhaser(true);

return true;
}

Expand Down

0 comments on commit 90ed9b3

Please sign in to comment.