mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-27 11:20:40 +00:00
JANITORIAL: Rename shouldRTL, resetRTL and FORCE_RTL
This commit is contained in:
parent
581a6ec7d6
commit
321a02aff2
@ -41,7 +41,7 @@ DefaultEventManager::DefaultEventManager(Common::EventSource *boss) :
|
||||
_buttonState(0),
|
||||
_modifierState(0),
|
||||
_shouldQuit(false),
|
||||
_shouldRTL(false),
|
||||
_shouldReturnToLauncher(false),
|
||||
_confirmExitDialogActive(false) {
|
||||
|
||||
assert(boss);
|
||||
@ -149,7 +149,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
|
||||
|
||||
if (_shouldQuit)
|
||||
event.type = Common::EVENT_QUIT;
|
||||
else if (_shouldRTL)
|
||||
else if (_shouldReturnToLauncher)
|
||||
event.type = Common::EVENT_RETURN_TO_LAUNCHER;
|
||||
break;
|
||||
#ifdef ENABLE_VKEYBD
|
||||
@ -174,9 +174,9 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
|
||||
if (g_engine)
|
||||
pt = g_engine->pauseEngine();
|
||||
GUI::MessageDialog alert(_("Do you really want to return to the Launcher?"), _("Launcher"), _("Cancel"));
|
||||
forwardEvent = _shouldRTL = (alert.runModal() == GUI::kMessageOK);
|
||||
forwardEvent = _shouldReturnToLauncher = (alert.runModal() == GUI::kMessageOK);
|
||||
} else
|
||||
_shouldRTL = true;
|
||||
_shouldReturnToLauncher = true;
|
||||
break;
|
||||
|
||||
case Common::EVENT_MUTE:
|
||||
|
@ -56,7 +56,7 @@ class DefaultEventManager : public Common::EventManager, Common::EventObserver {
|
||||
int _buttonState;
|
||||
int _modifierState;
|
||||
bool _shouldQuit;
|
||||
bool _shouldRTL;
|
||||
bool _shouldReturnToLauncher;
|
||||
bool _confirmExitDialogActive;
|
||||
|
||||
public:
|
||||
@ -72,9 +72,9 @@ public:
|
||||
virtual int getButtonState() const override { return _buttonState; }
|
||||
virtual int getModifierState() const override { return _modifierState; }
|
||||
virtual int shouldQuit() const override { return _shouldQuit; }
|
||||
virtual int shouldRTL() const override { return _shouldRTL; }
|
||||
virtual void resetRTL() override { _shouldRTL = false; }
|
||||
#ifdef FORCE_RTL
|
||||
virtual int shouldReturnToLauncher() const override { return _shouldReturnToLauncher; }
|
||||
virtual void resetReturnToLauncher() override { _shouldReturnToLauncher = false; }
|
||||
#ifdef FORCE_RETURN_TO_LAUNCHER
|
||||
virtual void resetQuit() override { _shouldQuit = false; }
|
||||
#endif
|
||||
|
||||
|
@ -341,7 +341,7 @@ bool OSystem_3DS::pollEvent(Common::Event &event) {
|
||||
aptMainLoop(); // Call apt hook when necessary
|
||||
|
||||
// If magnify mode is on when returning to Launcher, turn it off
|
||||
if (_eventManager->shouldRTL()) {
|
||||
if (_eventManager->shouldReturnToLauncher()) {
|
||||
if (_magnifyMode == MODE_MAGON) {
|
||||
_magnifyMode = MODE_MAGOFF;
|
||||
updateSize();
|
||||
|
@ -6,7 +6,7 @@
|
||||
# Scummvm engine config: choose which engines are enabled
|
||||
ENABLE_AGI = $(ENABLED)
|
||||
ENABLE_AGOS = $(ENABLED)
|
||||
ENABLE_AGOS2 = 1
|
||||
ENABLE_AGOS2 = 1
|
||||
# ENABLE_AVALANCHE = $(ENABLED)
|
||||
ENABLE_CGE = $(ENABLED)
|
||||
ENABLE_CINE = $(ENABLED)
|
||||
@ -98,7 +98,7 @@ FLAGS += -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-unused-paramete
|
||||
CFLAGS = $(FLAGS) -std=c99
|
||||
CXXFLAGS = $(FLAGS) -Wnon-virtual-dtor -Wno-reorder -fno-exceptions -fno-rtti
|
||||
|
||||
DEFINES = -D_EE -D__PLAYSTATION2__ -D__NEW_PS2SDK__ -DUSE_ZLIB -DFORCE_RTL -DDATA_PATH=\"host:data\"
|
||||
DEFINES = -D_EE -D__PLAYSTATION2__ -D__NEW_PS2SDK__ -DUSE_ZLIB -DFORCE_RETURN_TO_LAUNCHER -DDATA_PATH=\"host:data\"
|
||||
DEFINES += -DDISABLE_SAVEGAME_SORTING -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU
|
||||
# DEFINES += -DLOGORRHEIC
|
||||
|
||||
|
@ -51,7 +51,7 @@ FLAGS += -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-unused-paramete
|
||||
CFLAGS = $(FLAGS) -std=c99
|
||||
CXXFLAGS = $(FLAGS) -Wnon-virtual-dtor -Wno-reorder -fno-exceptions -fno-rtti
|
||||
|
||||
DEFINES = -D_EE -D__PLAYSTATION2__ -D__NEW_PS2SDK__ -DUSE_ZLIB -DFORCE_RTL -DDATA_PATH=\"host:data\"
|
||||
DEFINES = -D_EE -D__PLAYSTATION2__ -D__NEW_PS2SDK__ -DUSE_ZLIB -DFORCE_RETURN_TO_LAUNCHER -DDATA_PATH=\"host:data\"
|
||||
DEFINES += -DDISABLE_SAVEGAME_SORTING -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU
|
||||
# DEFINES += -DLOGORRHEIC
|
||||
|
||||
|
@ -584,13 +584,13 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
|
||||
}
|
||||
|
||||
// Quit unless an error occurred, or Return to launcher was requested
|
||||
#ifndef FORCE_RTL
|
||||
if (result.getCode() == Common::kNoError && !g_system->getEventManager()->shouldRTL())
|
||||
#ifndef FORCE_RETURN_TO_LAUNCHER
|
||||
if (result.getCode() == Common::kNoError && !g_system->getEventManager()->shouldReturnToLauncher())
|
||||
break;
|
||||
#endif
|
||||
// Reset RTL flag in case we want to load another engine
|
||||
g_system->getEventManager()->resetRTL();
|
||||
#ifdef FORCE_RTL
|
||||
g_system->getEventManager()->resetReturnToLauncher();
|
||||
#ifdef FORCE_RETURN_TO_LAUNCHER
|
||||
g_system->getEventManager()->resetQuit();
|
||||
#endif
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
|
@ -492,14 +492,14 @@ public:
|
||||
/**
|
||||
* Should we return to the launcher?
|
||||
*/
|
||||
virtual int shouldRTL() const = 0;
|
||||
virtual int shouldReturnToLauncher() const = 0;
|
||||
|
||||
/**
|
||||
* Reset the "return to launcher" flag (as returned shouldRTL()) to false.
|
||||
* Reset the "return to launcher" flag (as returned shouldReturnToLauncher()) to false.
|
||||
* Used when we have returned to the launcher.
|
||||
*/
|
||||
virtual void resetRTL() = 0;
|
||||
#ifdef FORCE_RTL
|
||||
virtual void resetReturnToLauncher() = 0;
|
||||
#ifdef FORCE_RETURN_TO_LAUNCHER
|
||||
virtual void resetQuit() = 0;
|
||||
#endif
|
||||
// Optional: check whether a given key is currently pressed ????
|
||||
|
2
configure
vendored
2
configure
vendored
@ -3707,7 +3707,7 @@ case $_backend in
|
||||
;;
|
||||
ps2)
|
||||
append_var DEFINES "-D_EE"
|
||||
append_var DEFINES "-DFORCE_RTL"
|
||||
append_var DEFINES "-DFORCE_RETURN_TO_LAUNCHER"
|
||||
append_var INCLUDES "-I$PS2SDK/ee/include"
|
||||
append_var INCLUDES "-I$PS2SDK/common/include"
|
||||
append_var INCLUDES "-I$PS2SDK/ports/include"
|
||||
|
@ -806,7 +806,7 @@ void Engine::quitGame() {
|
||||
|
||||
bool Engine::shouldQuit() {
|
||||
Common::EventManager *eventMan = g_system->getEventManager();
|
||||
return (eventMan->shouldQuit() || eventMan->shouldRTL());
|
||||
return (eventMan->shouldQuit() || eventMan->shouldReturnToLauncher());
|
||||
}
|
||||
|
||||
GUI::Debugger *Engine::getOrCreateDebugger() {
|
||||
|
@ -425,7 +425,7 @@ void EventManager::updateScreen() {
|
||||
s->_screenUpdateTime = g_system->getMillis();
|
||||
// Throttle the checking of shouldQuit() to 60fps as well, since
|
||||
// Engine::shouldQuit() invokes 2 virtual functions
|
||||
// (EventManager::shouldQuit() and EventManager::shouldRTL()),
|
||||
// (EventManager::shouldQuit() and EventManager::shouldReturnToLauncher()),
|
||||
// which is very expensive to invoke constantly without any
|
||||
// throttling at all.
|
||||
if (g_engine->shouldQuit())
|
||||
|
Loading…
Reference in New Issue
Block a user