Skip to content

Commit 6364971

Browse files
committed
Refactoring
1 parent c14e4f5 commit 6364971

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Src/DasherCore/DasherButtons.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,10 @@ void CDasherButtons::DirectKeyDown(unsigned long iTime, Keys::VirtualKey Key, CD
7575
}
7676

7777
void CDasherButtons::Timer(unsigned long Time, CDasherView *pView, CDasherInput *pInput, CDasherModel *pModel, CExpansionPolicy **pol) {
78-
if (m_bMenu && m_pSettingsStore->GetLongParameter(LP_BUTTON_SCAN_TIME) &&
79-
Time > m_iScanTime) {
78+
if (m_bMenu && m_pSettingsStore->GetLongParameter(LP_BUTTON_SCAN_TIME) && Time > m_iScanTime) {
8079
m_iScanTime = Time + m_pSettingsStore->GetLongParameter(LP_BUTTON_SCAN_TIME);
8180
m_bDecorationChanged = true;
82-
++iActiveBox;
83-
if(iActiveBox == m_iNumBoxes)
84-
iActiveBox = 0;
81+
iActiveBox = (iActiveBox + 1) % m_iNumBoxes;
8582
}
8683
// TODO: This is a bit of a hack to make joystick mode work
8784
myint iDasherX;

0 commit comments

Comments
 (0)