implement swapping the position of both screens

closes #855
This commit is contained in:
RSDuck
2021-01-17 22:16:32 +01:00
parent 1d6cc3c6ef
commit d529b650c0
6 changed files with 26 additions and 4 deletions

View File

@ -109,7 +109,7 @@ void M23_Transform(float* m, float& x, float& y)
}
void SetupScreenLayout(int screenWidth, int screenHeight, int screenLayout, int rotation, int sizing, int screenGap, bool integerScale)
void SetupScreenLayout(int screenWidth, int screenHeight, int screenLayout, int rotation, int sizing, int screenGap, bool integerScale, int swapScreens)
{
float refpoints[4][2] =
{
@ -152,7 +152,7 @@ void SetupScreenLayout(int screenWidth, int screenHeight, int screenLayout, int
(((layout == 0 && (rotation % 2 == 0)) || (layout == 1 && (rotation % 2 == 1))
? 192.f : 256.f)
+ screenGap) / 2.f;
if (rotation == 1 || rotation == 2)
if ((rotation == 1 || rotation == 2) ^ swapScreens)
offset *= -1.f;
M23_Translate(TopScreenMtx, (idx==0)?-offset:0, (idx==1)?-offset:0);