summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-28 12:39:08 +0200
committereray orçunus <erayorcunus@gmail.com>2020-05-28 16:42:40 +0200
commit9acf27fc5359ec8a4e047a35384ca28270145db8 (patch)
tree708aef083f488f0aa09330abd657ae798d32cb05
parenttheoretically fix linux build (diff)
downloadre3-9acf27fc5359ec8a4e047a35384ca28270145db8.tar
re3-9acf27fc5359ec8a4e047a35384ca28270145db8.tar.gz
re3-9acf27fc5359ec8a4e047a35384ca28270145db8.tar.bz2
re3-9acf27fc5359ec8a4e047a35384ca28270145db8.tar.lz
re3-9acf27fc5359ec8a4e047a35384ca28270145db8.tar.xz
re3-9acf27fc5359ec8a4e047a35384ca28270145db8.tar.zst
re3-9acf27fc5359ec8a4e047a35384ca28270145db8.zip
-rw-r--r--src/core/Frontend.h15
-rw-r--r--src/extras/frontendoption.cpp9
2 files changed, 15 insertions, 9 deletions
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 9a364b71..7d4cdacc 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -646,13 +646,14 @@ public:
int GetNumOptionsCntrlConfigScreens();
int ConstructStatLine(int);
- // New (inlined ones and the ones we can't believe it's not inlined)
- inline void ThingsToDoBeforeGoingBack();
- inline void ScrollUpListByOne();
- inline void ScrollDownListByOne();
- inline void PageUpList(bool);
- inline void PageDownList(bool);
- inline int8 GetPreviousPageOption();
+ // Those are either inlined in game, not in function yet, or I can't believe that they're not inlined.
+ // Names were made up by me.
+ void ThingsToDoBeforeGoingBack();
+ void ScrollUpListByOne();
+ void ScrollDownListByOne();
+ void PageUpList(bool);
+ void PageDownList(bool);
+ int8 GetPreviousPageOption();
// uint8 GetNumberOfMenuOptions();
};
diff --git a/src/extras/frontendoption.cpp b/src/extras/frontendoption.cpp
index 7b7ad229..6ab2801c 100644
--- a/src/extras/frontendoption.cpp
+++ b/src/extras/frontendoption.cpp
@@ -50,8 +50,13 @@ RemoveCustomFrontendOptions()
for (int i = 0; i < MENUPAGES; i++) {
for (int j = 0; j < NUM_MENUROWS; j++) {
if (aScreens[i].m_aEntries[j].m_Action == MENUACTION_TRIGGERFUNC) {
- aScreens[i].m_aEntries[j].m_Action = MENUACTION_NOTHING;
- aScreens[i].m_aEntries[j].m_EntryName[0] = '\0';
+ int k;
+ for (k = j; k < NUM_MENUROWS-1; k++) {
+ memcpy(&aScreens[i].m_aEntries[k], &aScreens[i].m_aEntries[k+1], sizeof(CMenuScreen::CMenuEntry));
+ }
+ aScreens[i].m_aEntries[k].m_Action = MENUACTION_NOTHING;
+ aScreens[i].m_aEntries[k].m_EntryName[0] = '\0';
+ j--;
}
}
}