Skip to content

Commit 5db53c0

Browse files
committed
When turning on a trick display, automatically turn off the other trick displays
1 parent 3db8f46 commit 5db53c0

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

ttyd-tools/rel/source/codes.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,13 +1115,13 @@ void displayBlimpTicketSkipDetails()
11151115
BlimpTicketSkip.StraightUpTimerStopped = false;
11161116
}
11171117

1118-
#ifdef TTYD_JP
1118+
double StickAngle = getStickAngle(nullptr);
11191119
double UpRightAngleStart = 25;
1120-
#else
1121-
double UpRightAngleStart = 27;
1120+
1121+
#ifdef TTYD_JP
1122+
UpRightAngleStart += 2;
11221123
#endif
11231124

1124-
double StickAngle = getStickAngle(nullptr);
11251125
if (StickAngle >= UpRightAngleStart)
11261126
{
11271127
// Stop the up-right timer when the angle held reaches or exceeds 25 for JP, or 27 for US/EU

ttyd-tools/rel/source/global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace mod {
55

6-
const char *VersionNumber = "v3.0.34";
6+
const char *VersionNumber = "v3.0.35";
77

88
const char *RootLines[] =
99
{

ttyd-tools/rel/source/menu.cpp

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,8 +2496,41 @@ void menuCheckButton()
24962496
case A:
24972497
{
24982498
// Flip the bool for the current display
2499-
bool DisplayActive = Displays[tempMenuSelectedOption];
2500-
Displays[tempMenuSelectedOption] = !DisplayActive;
2499+
bool DisplayActive = !Displays[tempMenuSelectedOption];
2500+
Displays[tempMenuSelectedOption] = DisplayActive;
2501+
2502+
// Exit if the display was turned off
2503+
if (!DisplayActive)
2504+
{
2505+
break;
2506+
}
2507+
2508+
// If one of the trick displays was turned on, then turn off the other trick displays
2509+
switch (tempMenuSelectedOption)
2510+
{
2511+
case YOSHI_SKIP:
2512+
{
2513+
Displays[PALACE_SKIP] = false;
2514+
Displays[BLIMP_TICKET_SKIP] = false;
2515+
break;
2516+
}
2517+
case PALACE_SKIP:
2518+
{
2519+
Displays[YOSHI_SKIP] = false;
2520+
Displays[BLIMP_TICKET_SKIP] = false;
2521+
break;
2522+
}
2523+
case BLIMP_TICKET_SKIP:
2524+
{
2525+
Displays[YOSHI_SKIP] = false;
2526+
Displays[PALACE_SKIP] = false;
2527+
break;
2528+
}
2529+
default:
2530+
{
2531+
break;
2532+
}
2533+
}
25012534
break;
25022535
}
25032536
case B:

0 commit comments

Comments
 (0)