Skip to content

Commit

Permalink
Fix Light Phaser with overscan
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Dec 28, 2024
1 parent e24cb42 commit ad53d7e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/GearsystemCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,23 @@ void GearsystemCore::KeyReleased(GS_Joypads joypad, GS_Keys key)

void GearsystemCore::SetPhaser(int x, int y)
{
switch (m_pVideo->GetOverscan())
{
case Video::OverscanTopBottom:
y -= m_pCartridge->IsPAL() ? GS_RESOLUTION_SMS_OVERSCAN_V_PAL : GS_RESOLUTION_SMS_OVERSCAN_V;
break;
case Video::OverscanFull320:
x -= GS_RESOLUTION_SMS_OVERSCAN_H_320_L;
y -= GS_RESOLUTION_SMS_OVERSCAN_V;
break;
case Video::OverscanFull284:
x -= GS_RESOLUTION_SMS_OVERSCAN_H_284_L;
y -= GS_RESOLUTION_SMS_OVERSCAN_V;
break;
default:
break;
}

m_pInput->SetPhaser(x, y);
}

Expand Down

0 comments on commit ad53d7e

Please sign in to comment.