mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-22 23:00:01 +00:00
Frontend: disable windowed mode selector in game
This commit is contained in:
parent
28ec412369
commit
ee05c7fe42
|
@ -1564,6 +1564,7 @@ CMenuManager::Draw()
|
||||||
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[i];
|
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[i];
|
||||||
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
||||||
|
|
||||||
|
isOptionDisabled = option.m_CFOSelect->disableIfGameLoaded && !m_bGameNotLoaded;
|
||||||
if (option.m_CFOSelect->onlyApplyOnEnter){
|
if (option.m_CFOSelect->onlyApplyOnEnter){
|
||||||
if (m_nCurrOption != i) {
|
if (m_nCurrOption != i) {
|
||||||
if (option.m_CFOSelect->displayedValue != option.m_CFOSelect->lastSavedValue)
|
if (option.m_CFOSelect->displayedValue != option.m_CFOSelect->lastSavedValue)
|
||||||
|
@ -5081,6 +5082,9 @@ CMenuManager::ProcessButtonPresses(void)
|
||||||
case MENUACTION_CFO_DYNAMIC:
|
case MENUACTION_CFO_DYNAMIC:
|
||||||
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
|
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
|
||||||
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
||||||
|
if (option.m_CFOSelect->disableIfGameLoaded && !m_bGameNotLoaded)
|
||||||
|
break;
|
||||||
|
|
||||||
if (!option.m_CFOSelect->onlyApplyOnEnter) {
|
if (!option.m_CFOSelect->onlyApplyOnEnter) {
|
||||||
option.m_CFOSelect->displayedValue++;
|
option.m_CFOSelect->displayedValue++;
|
||||||
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
|
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
|
||||||
|
@ -5307,6 +5311,9 @@ CMenuManager::ProcessButtonPresses(void)
|
||||||
case MENUACTION_CFO_DYNAMIC:
|
case MENUACTION_CFO_DYNAMIC:
|
||||||
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
|
CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
|
||||||
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
if (option.m_Action == MENUACTION_CFO_SELECT) {
|
||||||
|
if (option.m_CFOSelect->disableIfGameLoaded && !m_bGameNotLoaded)
|
||||||
|
break;
|
||||||
|
|
||||||
if (changeValueBy > 0) {
|
if (changeValueBy > 0) {
|
||||||
option.m_CFOSelect->displayedValue++;
|
option.m_CFOSelect->displayedValue++;
|
||||||
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts)
|
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts)
|
||||||
|
|
|
@ -505,9 +505,10 @@ struct CCFOSelect : CCFO
|
||||||
int8 displayedValue; // only if onlyApplyOnEnter enabled for now
|
int8 displayedValue; // only if onlyApplyOnEnter enabled for now
|
||||||
int8 lastSavedValue; // only if onlyApplyOnEnter enabled
|
int8 lastSavedValue; // only if onlyApplyOnEnter enabled
|
||||||
ChangeFunc changeFunc;
|
ChangeFunc changeFunc;
|
||||||
|
bool disableIfGameLoaded;
|
||||||
|
|
||||||
CCFOSelect() {};
|
CCFOSelect() {};
|
||||||
CCFOSelect(int8* value, const char* save, const char** rightTexts, int8 numRightTexts, bool onlyApplyOnEnter, ChangeFunc changeFunc){
|
CCFOSelect(int8* value, const char* save, const char** rightTexts, int8 numRightTexts, bool onlyApplyOnEnter, ChangeFunc changeFunc = nil, bool disableIfGameLoaded = false){
|
||||||
this->value = value;
|
this->value = value;
|
||||||
if (value)
|
if (value)
|
||||||
this->lastSavedValue = this->displayedValue = *value;
|
this->lastSavedValue = this->displayedValue = *value;
|
||||||
|
@ -517,6 +518,7 @@ struct CCFOSelect : CCFO
|
||||||
this->numRightTexts = numRightTexts;
|
this->numRightTexts = numRightTexts;
|
||||||
this->onlyApplyOnEnter = onlyApplyOnEnter;
|
this->onlyApplyOnEnter = onlyApplyOnEnter;
|
||||||
this->changeFunc = changeFunc;
|
this->changeFunc = changeFunc;
|
||||||
|
this->disableIfGameLoaded = disableIfGameLoaded;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||||
|
|
||||||
#ifdef IMPROVED_VIDEOMODE
|
#ifdef IMPROVED_VIDEOMODE
|
||||||
#define VIDEOMODE_SELECTOR MENUACTION_CFO_SELECT, "FEM_SCF", { new CCFOSelect((int8*)&FrontEndMenuManager.m_nPrefsWindowed, nil, screenModes, 2, true, ScreenModeAfterChange) },
|
#define VIDEOMODE_SELECTOR MENUACTION_CFO_SELECT, "FEM_SCF", { new CCFOSelect((int8*)&FrontEndMenuManager.m_nPrefsWindowed, nil, screenModes, 2, true, ScreenModeAfterChange, true) },
|
||||||
#else
|
#else
|
||||||
#define VIDEOMODE_SELECTOR
|
#define VIDEOMODE_SELECTOR
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,19 +36,19 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||||
#define CUTSCENE_BORDERS_TOGGLE MENUACTION_CFO_SELECT, "FEM_CSB", { new CCFOSelect((int8 *)&CMenuManager::m_PrefsCutsceneBorders, "CutsceneBorders", off_on, 2, false, nil) },
|
#define CUTSCENE_BORDERS_TOGGLE MENUACTION_CFO_SELECT, "FEM_CSB", { new CCFOSelect((int8 *)&CMenuManager::m_PrefsCutsceneBorders, "CutsceneBorders", off_on, 2, false) },
|
||||||
#else
|
#else
|
||||||
#define CUTSCENE_BORDERS_TOGGLE
|
#define CUTSCENE_BORDERS_TOGGLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FREE_CAM
|
#ifdef FREE_CAM
|
||||||
#define FREE_CAM_TOGGLE MENUACTION_CFO_SELECT, "FEC_FRC", { new CCFOSelect((int8*)&TheCamera.bFreeCam, "FreeCam", off_on, 2, false, nil) },
|
#define FREE_CAM_TOGGLE MENUACTION_CFO_SELECT, "FEC_FRC", { new CCFOSelect((int8*)&TheCamera.bFreeCam, "FreeCam", off_on, 2, false) },
|
||||||
#else
|
#else
|
||||||
#define FREE_CAM_TOGGLE
|
#define FREE_CAM_TOGGLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PS2_ALPHA_TEST
|
#ifdef PS2_ALPHA_TEST
|
||||||
#define DUALPASS_SELECTOR MENUACTION_CFO_SELECT, "FEM_2PR", { new CCFOSelect((int8*)&gPS2alphaTest, "PS2AlphaTest", off_on, 2, false, nil) },
|
#define DUALPASS_SELECTOR MENUACTION_CFO_SELECT, "FEM_2PR", { new CCFOSelect((int8*)&gPS2alphaTest, "PS2AlphaTest", off_on, 2, false) },
|
||||||
#else
|
#else
|
||||||
#define DUALPASS_SELECTOR
|
#define DUALPASS_SELECTOR
|
||||||
#endif
|
#endif
|
||||||
|
@ -61,14 +61,14 @@
|
||||||
|
|
||||||
#ifdef EXTENDED_COLOURFILTER
|
#ifdef EXTENDED_COLOURFILTER
|
||||||
#define POSTFX_SELECTORS \
|
#define POSTFX_SELECTORS \
|
||||||
MENUACTION_CFO_SELECT, "FED_CLF", { new CCFOSelect((int8*)&CPostFX::EffectSwitch, "ColourFilter", filterNames, ARRAY_SIZE(filterNames), false, nil) }, \
|
MENUACTION_CFO_SELECT, "FED_CLF", { new CCFOSelect((int8*)&CPostFX::EffectSwitch, "ColourFilter", filterNames, ARRAY_SIZE(filterNames), false) }, \
|
||||||
MENUACTION_CFO_SELECT, "FED_MBL", { new CCFOSelect((int8*)&CPostFX::MotionBlurOn, "MotionBlur", off_on, 2, false, nil) },
|
MENUACTION_CFO_SELECT, "FED_MBL", { new CCFOSelect((int8*)&CPostFX::MotionBlurOn, "MotionBlur", off_on, 2, false) },
|
||||||
#else
|
#else
|
||||||
#define POSTFX_SELECTORS
|
#define POSTFX_SELECTORS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef INVERT_LOOK_FOR_PAD
|
#ifdef INVERT_LOOK_FOR_PAD
|
||||||
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_IVP", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, "InvertPad", off_on, 2, false, nil) },
|
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_IVP", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, "InvertPad", off_on, 2, false) },
|
||||||
#else
|
#else
|
||||||
#define INVERT_PAD_SELECTOR
|
#define INVERT_PAD_SELECTOR
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue