@@ -1562,6 +1562,32 @@ void menuCheckButton()
1562
1562
}
1563
1563
break ;
1564
1564
}
1565
+ case DUPLICATE_WATCH:
1566
+ {
1567
+ uint32_t tempAddress = MemoryWatch[0 ].Address ;
1568
+ if (tempAddress)
1569
+ {
1570
+ int32_t EmptyWatchSlot = getEmptyWatchSlot ();
1571
+ if (EmptyWatchSlot >= 0 )
1572
+ {
1573
+ SelectedOption = tempCurrentMenuOption;
1574
+ CurrentMenuOption = tempCurrentPage * 10 ;
1575
+ }
1576
+ else
1577
+ {
1578
+ // There are no more free slots
1579
+ FunctionReturnCode = NO_SLOTS_LEFT;
1580
+ Timer = secondsToFrames (3 );
1581
+ }
1582
+ }
1583
+ else
1584
+ {
1585
+ // All slots are empty
1586
+ FunctionReturnCode = ALL_SLOTS_EMPTY;
1587
+ Timer = secondsToFrames (3 );
1588
+ }
1589
+ break ;
1590
+ }
1565
1591
case MODIFY_WATCH:
1566
1592
{
1567
1593
uint32_t tempAddress = MemoryWatch[0 ].Address ;
@@ -1601,6 +1627,40 @@ void menuCheckButton()
1601
1627
}
1602
1628
break ;
1603
1629
}
1630
+ case DUPLICATE_WATCH:
1631
+ {
1632
+ uint32_t tempAddress = MemoryWatch[0 ].Address ;
1633
+ if (tempAddress)
1634
+ {
1635
+ int32_t EmptyWatchSlot = getEmptyWatchSlot ();
1636
+ if (EmptyWatchSlot >= 0 )
1637
+ {
1638
+ duplicateWatch (static_cast <int32_t >(tempCurrentMenuOption), EmptyWatchSlot);
1639
+
1640
+ // Recheck to see if there are any empty slots left
1641
+ if (getEmptyWatchSlot () < 0 )
1642
+ {
1643
+ // There are no more free slots
1644
+ closeSecondaryMenu ();
1645
+ }
1646
+ }
1647
+ else
1648
+ {
1649
+ // There are no more free slots
1650
+ closeSecondaryMenu ();
1651
+ FunctionReturnCode = NO_SLOTS_LEFT;
1652
+ Timer = secondsToFrames (3 );
1653
+ }
1654
+ }
1655
+ else
1656
+ {
1657
+ // All slots are empty
1658
+ closeSecondaryMenu ();
1659
+ FunctionReturnCode = NO_SLOTS_LEFT;
1660
+ Timer = secondsToFrames (3 );
1661
+ }
1662
+ break ;
1663
+ }
1604
1664
case MODIFY_WATCH:
1605
1665
{
1606
1666
uint32_t tempAddress = MemoryWatch[0 ].Address ;
@@ -1614,6 +1674,7 @@ void menuCheckButton()
1614
1674
else
1615
1675
{
1616
1676
// All slots are empty
1677
+ closeSecondaryMenu ();
1617
1678
FunctionReturnCode = NO_SLOTS_LEFT;
1618
1679
Timer = secondsToFrames (3 );
1619
1680
}
@@ -1629,6 +1690,7 @@ void menuCheckButton()
1629
1690
else
1630
1691
{
1631
1692
// All slots are empty
1693
+ closeSecondaryMenu ();
1632
1694
FunctionReturnCode = NO_SLOTS_LEFT;
1633
1695
Timer = secondsToFrames (3 );
1634
1696
}
0 commit comments