[Scummvm-git-logs] scummvm master -> 2c1065188e2f37245ad3d674b652d356e87d6100
sev-
sev at scummvm.org
Mon Aug 24 12:19:33 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2c1065188e SYMBIAN: Deprecate the actions system
Commit: 2c1065188e2f37245ad3d674b652d356e87d6100
https://github.com/scummvm/scummvm/commit/2c1065188e2f37245ad3d674b652d356e87d6100
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-08-24T14:19:30+02:00
Commit Message:
SYMBIAN: Deprecate the actions system
Changed paths:
backends/events/symbiansdl/symbiansdl-events.cpp
backends/events/symbiansdl/symbiansdl-events.h
backends/platform/symbian/src/SymbianActions.cpp
backends/platform/symbian/src/SymbianActions.h
backends/platform/symbian/src/SymbianOS.cpp
backends/platform/symbian/src/SymbianOS.h
backends/platform/symbian/src/portdefs.h
engines/dialogs.cpp
engines/dialogs.h
engines/scumm/dialogs.cpp
gui/Actions.cpp
gui/Actions.h
gui/Key.cpp
gui/Key.h
gui/KeysDialog.cpp
gui/KeysDialog.h
diff --git a/backends/events/symbiansdl/symbiansdl-events.cpp b/backends/events/symbiansdl/symbiansdl-events.cpp
index c73424ec62..2377fa49bf 100644
--- a/backends/events/symbiansdl/symbiansdl-events.cpp
+++ b/backends/events/symbiansdl/symbiansdl-events.cpp
@@ -22,7 +22,7 @@
#include "common/scummsys.h"
-#ifdef __SYMBIAN32__
+#if defined(__SYMBIAN32__) && defined(GUI_ENABLE_KEYSDIALOG)
#include "backends/events/symbiansdl/symbiansdl-events.h"
#include "backends/platform/symbian/src/SymbianActions.h"
diff --git a/backends/events/symbiansdl/symbiansdl-events.h b/backends/events/symbiansdl/symbiansdl-events.h
index 9b107dc0f4..d5276bc194 100644
--- a/backends/events/symbiansdl/symbiansdl-events.h
+++ b/backends/events/symbiansdl/symbiansdl-events.h
@@ -25,6 +25,8 @@
#include "backends/events/sdl/legacy-sdl-events.h"
+#ifdef GUI_ENABLE_KEYSDIALOG
+
#define TOTAL_ZONES 3
/**
@@ -55,3 +57,5 @@ protected:
};
#endif
+
+#endif
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index 0810b382d2..3f5eab2b97 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -22,6 +22,8 @@
#include "backends/platform/symbian/src/SymbianActions.h"
+#ifdef GUI_ENABLE_KEYSDIALOG
+
#include "gui/message.h"
#include "scumm/scumm.h"
#include "common/config-manager.h"
@@ -257,3 +259,5 @@ bool SymbianActions::perform(ActionType /*action*/, bool /*pushed*/) {
}
} // namespace GUI
+
+#endif
diff --git a/backends/platform/symbian/src/SymbianActions.h b/backends/platform/symbian/src/SymbianActions.h
index fc68091c74..bcc8448366 100644
--- a/backends/platform/symbian/src/SymbianActions.h
+++ b/backends/platform/symbian/src/SymbianActions.h
@@ -24,6 +24,9 @@
#define SYMBIANACTIONS_H
#include "common/scummsys.h"
+
+#ifdef GUI_ENABLE_KEYSDIALOG
+
#include "common/system.h"
#include "gui/Key.h"
#include "gui/Actions.h"
@@ -78,3 +81,5 @@ private:
} // namespace GUI
#endif
+
+#endif
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 59b2922f3e..ee11858477 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -27,7 +27,6 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_fopen
#include "backends/platform/symbian/src/SymbianOS.h"
-#include "backends/platform/symbian/src/SymbianActions.h"
#include "common/config-manager.h"
#include "common/scummsys.h"
#include "common/translation.h"
@@ -36,9 +35,13 @@
#include "backends/fs/symbian/symbian-fs-factory.h"
#include "backends/saves/default/default-saves.h"
-#include "backends/events/symbiansdl/symbiansdl-events.h"
#include "backends/mixer/symbiansdl/symbiansdl-mixer.h"
+#ifdef GUI_ENABLE_KEYSDIALOG
+#include "backends/platform/symbian/src/SymbianActions.h"
+#include "backends/events/symbiansdl/symbiansdl-events.h"
+#endif
+
#define DEFAULT_CONFIG_FILE "scummvm.ini"
#define DEFAULT_SAVE_PATH "Savegames"
@@ -99,11 +102,14 @@ void OSystem_SDL_Symbian::initBackend() {
ConfMan.setBool("fullscreen", true);
ConfMan.flushToDisk();
+#ifdef GUI_ENABLE_KEYSDIALOG
GUI::Actions::init();
// Creates the backend managers
if (_eventSource == 0)
_eventSource = new SymbianSdlEventSource();
+#endif
+
if (_mixerManager == 0) {
_mixerManager = new SymbianSdlMixerManager();
@@ -114,11 +120,13 @@ void OSystem_SDL_Symbian::initBackend() {
// Call parent implementation of this method
OSystem_SDL::initBackend();
+#ifdef GUI_ENABLE_KEYSDIALOG
// Initialize global key mapping for Smartphones
GUI::Actions* actions = GUI::Actions::Instance();
actions->initInstanceMain(this);
actions->loadMapping();
+#endif
}
void OSystem_SDL_Symbian::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
@@ -135,6 +143,7 @@ void OSystem_SDL_Symbian::quitWithErrorMsg(const char * /*aMsg*/) {
g_system->quit();
}
+#ifdef GUI_ENABLE_KEYSDIALOG
void OSystem_SDL_Symbian::quit() {
delete GUI_Actions::Instance();
@@ -158,6 +167,7 @@ void OSystem_SDL_Symbian::checkMappings() {
GUI::Actions::Instance()->initInstanceGame();
}
+#endif
Common::String OSystem_SDL_Symbian::getDefaultConfigFileName() {
char configFile[MAXPATHLEN];
@@ -167,7 +177,11 @@ Common::String OSystem_SDL_Symbian::getDefaultConfigFileName() {
}
bool OSystem_SDL_Symbian::hasFeature(Feature f) {
- if (f == kFeatureJoystickDeadzone || f == kFeatureFullscreenMode)
+#ifdef GUI_ENABLE_KEYSDIALOG
+ if (f == kFeatureJoystickDeadzone)
+ return false;
+#endif
+ if (f == kFeatureFullscreenMode)
return false;
return OSystem_SDL::hasFeature(f);
diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h
index ad11433887..51bfecfcdd 100644
--- a/backends/platform/symbian/src/SymbianOS.h
+++ b/backends/platform/symbian/src/SymbianOS.h
@@ -34,9 +34,11 @@ public:
// Override from OSystem_SDL
virtual void init();
virtual void initBackend();
+#ifdef GUI_ENABLE_KEYSDIALOG
virtual void quit();
virtual void engineInit();
virtual void engineDone();
+#endif
virtual Common::String getDefaultConfigFileName();
virtual bool hasFeature(Feature f);
@@ -50,10 +52,12 @@ public:
void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
protected:
+#ifdef GUI_ENABLE_KEYSDIALOG
/**
* Used to intialized special game mappings
*/
void checkMappings();
+#endif
RFs* _RFs;
};
diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h
index 1a93c9c722..f4a739df41 100644
--- a/backends/platform/symbian/src/portdefs.h
+++ b/backends/platform/symbian/src/portdefs.h
@@ -84,6 +84,7 @@ namespace std
#undef remove
#endif
+// TODO: Replace this with the keymapper
#define GUI_ENABLE_KEYSDIALOG
#define DISABLE_COMMAND_LINE
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index f434071ace..477c0bd20e 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -234,9 +234,11 @@ void MainMenuDialog::load() {
close();
}
+#ifdef GUI_ENABLE_KEYSDIALOG
enum {
kKeysCmd = 'KEYS'
};
+#endif
namespace GUI {
@@ -373,24 +375,23 @@ void ConfigDialog::apply() {
OptionsDialog::apply();
}
+#ifdef GUI_ENABLE_KEYSDIALOG
void ConfigDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case kKeysCmd:
-
-#ifdef GUI_ENABLE_KEYSDIALOG
- //
- // Create the sub dialog(s)
- //
- _keysDialog = new GUI::KeysDialog();
- _keysDialog->runModal();
- delete _keysDialog;
- _keysDialog = NULL;
-#endif
+ //
+ // Create the sub dialog(s)
+ //
+ _keysDialog = new GUI::KeysDialog();
+ _keysDialog->runModal();
+ delete _keysDialog;
+ _keysDialog = NULL;
break;
default:
GUI::OptionsDialog::handleCommand (sender, cmd, data);
}
}
+#endif
ExtraGuiOptionsWidget::ExtraGuiOptionsWidget(GuiObject *containerBoss, const Common::String &name, const Common::String &domain, const ExtraGuiOptions &options) :
OptionsContainerWidget(containerBoss, name, dialogLayout(domain), false, domain),
diff --git a/engines/dialogs.h b/engines/dialogs.h
index 620812beea..def91ba891 100644
--- a/engines/dialogs.h
+++ b/engines/dialogs.h
@@ -85,8 +85,6 @@ public:
ConfigDialog();
~ConfigDialog() override;
- void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
-
// OptionsDialog API
void build() override;
void apply() override;
@@ -95,6 +93,10 @@ private:
OptionsContainerWidget *_engineOptions;
#ifdef GUI_ENABLE_KEYSDIALOG
+public:
+ void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
+
+private:
Dialog *_keysDialog;
#endif
};
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 14bf29e1f2..c5d85f04bf 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -48,10 +48,6 @@
#include "scumm/help.h"
#endif
-#ifdef GUI_ENABLE_KEYSDIALOG
-#include "gui/KeysDialog.h"
-#endif
-
using Graphics::kTextAlignCenter;
using Graphics::kTextAlignLeft;
using GUI::WIDGET_ENABLED;
diff --git a/gui/Actions.cpp b/gui/Actions.cpp
index 0c4aa6ba75..4ea2940ecd 100644
--- a/gui/Actions.cpp
+++ b/gui/Actions.cpp
@@ -21,6 +21,9 @@
*/
#include "gui/Actions.h"
+
+#ifdef GUI_ENABLE_KEYSDIALOG
+
#include "gui/message.h"
#include "common/config-manager.h"
@@ -28,6 +31,8 @@
#include "backends/platform/symbian/src/SymbianActions.h"
#endif
+#warning The actions system is deprecated. Please use the keymapper instead.
+
namespace GUI {
Actions* Actions::Instance() {
@@ -150,3 +155,5 @@ Actions *Actions::_instance = NULL;
} // namespace GUI
+
+#endif
diff --git a/gui/Actions.h b/gui/Actions.h
index ac7bd39093..967f7c4a28 100644
--- a/gui/Actions.h
+++ b/gui/Actions.h
@@ -24,6 +24,9 @@
#define GUI_ACTIONS_H
#include "common/scummsys.h"
+
+#ifdef GUI_ENABLE_KEYSDIALOG
+
#include "common/system.h"
#include "gui/Key.h"
@@ -82,4 +85,7 @@ protected:
} // namespace GUI
typedef GUI::Actions GUI_Actions;
+
+#endif
+
#endif
diff --git a/gui/Key.cpp b/gui/Key.cpp
index cec48ffb65..80baeca3c7 100644
--- a/gui/Key.cpp
+++ b/gui/Key.cpp
@@ -22,6 +22,10 @@
#include "gui/Key.h"
+#ifdef GUI_ENABLE_KEYSDIALOG
+
+#warning The actions system is deprecated. Please use the keymapper instead.
+
namespace GUI {
Key::Key() :
@@ -65,3 +69,5 @@ int Key::flags() {
}
} // namespace GUI
+
+#endif
diff --git a/gui/Key.h b/gui/Key.h
index 8bbbc4fdaa..6052a6f892 100644
--- a/gui/Key.h
+++ b/gui/Key.h
@@ -24,6 +24,9 @@
#define GUI_KEY_H
#include "common/scummsys.h"
+
+#ifdef GUI_ENABLE_KEYSDIALOG
+
#include "common/system.h"
namespace GUI {
@@ -56,3 +59,5 @@ private:
} // namespace GUI
#endif
+
+#endif
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp
index 22d8cb42a8..d11b94ae43 100644
--- a/gui/KeysDialog.cpp
+++ b/gui/KeysDialog.cpp
@@ -21,6 +21,11 @@
*/
#include "gui/KeysDialog.h"
+
+#ifdef GUI_ENABLE_KEYSDIALOG
+
+#warning The actions system is deprecated. Please use the keymapper instead.
+
#include "gui/Actions.h"
#include "common/translation.h"
#include <SDL_keyboard.h>
@@ -146,3 +151,5 @@ void KeysDialog::handleKeyUp(Common::KeyState state) {
}
} // namespace GUI
+
+#endif
diff --git a/gui/KeysDialog.h b/gui/KeysDialog.h
index de60450db4..f9b8063242 100644
--- a/gui/KeysDialog.h
+++ b/gui/KeysDialog.h
@@ -23,6 +23,10 @@
#ifndef KEYSDIALOG_H
#define KEYSDIALOG_H
+#include "common/scummsys.h"
+
+#ifdef GUI_ENABLE_KEYSDIALOG
+
#include "gui/gui-manager.h"
#include "gui/dialog.h"
#include "gui/widgets/list.h"
@@ -50,3 +54,5 @@ protected:
} // namespace GUI
#endif
+
+#endif
More information about the Scummvm-git-logs
mailing list