aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorCameron Cawley2019-11-05 22:19:47 +0000
committerFilippos Karapetis2019-12-01 01:04:06 +0200
commit48615cb83e1889166503b9d3bef7c50203cc441a (patch)
tree9c0a4d9e0e7252015c31ae6b815089a12ab730de /backends
parentaee09409e8b30dbd8ea10c9190b85037fe8458c9 (diff)
downloadscummvm-rg350-48615cb83e1889166503b9d3bef7c50203cc441a.tar.gz
scummvm-rg350-48615cb83e1889166503b9d3bef7c50203cc441a.tar.bz2
scummvm-rg350-48615cb83e1889166503b9d3bef7c50203cc441a.zip
BACKENDS: Move implementation of OSystem::quit() out of ModularBackend
Diffstat (limited to 'backends')
-rw-r--r--backends/modular-backend.cpp6
-rw-r--r--backends/modular-backend.h2
-rw-r--r--backends/platform/null/null.cpp7
-rw-r--r--backends/platform/tizen/system.cpp6
-rw-r--r--backends/platform/tizen/system.h1
5 files changed, 15 insertions, 7 deletions
diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index a06448d4d2..963e987119 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -20,8 +20,6 @@
*
*/
-#define FORBIDDEN_SYMBOL_EXCEPTION_exit
-
#include "backends/modular-backend.h"
#include "backends/graphics/graphics.h"
@@ -277,7 +275,3 @@ void ModularBackend::displayMessageOnOSD(const char *msg) {
void ModularBackend::displayActivityIconOnOSD(const Graphics::Surface *icon) {
_graphicsManager->displayActivityIconOnOSD(icon);
}
-
-void ModularBackend::quit() {
- exit(0);
-}
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index 580e992fce..a89df7debc 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -40,6 +40,7 @@ class MutexManager;
* OSystem::getMillis()
* OSystem::delayMillis()
* OSystem::getTimeAndDate()
+ * OSystem::quit()
*
* And, it should also initialize all the managers variables
* declared in this class, or override their related functions.
@@ -133,7 +134,6 @@ public:
/** @name Miscellaneous */
//@{
- virtual void quit() override;
virtual void displayMessageOnOSD(const char *msg) override;
virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp
index 6261212f5f..4117982737 100644
--- a/backends/platform/null/null.cpp
+++ b/backends/platform/null/null.cpp
@@ -27,6 +27,7 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_stdout
#define FORBIDDEN_SYMBOL_EXCEPTION_stderr
#define FORBIDDEN_SYMBOL_EXCEPTION_fputs
+#define FORBIDDEN_SYMBOL_EXCEPTION_exit
#include "backends/modular-backend.h"
#include "base/main.h"
@@ -67,6 +68,8 @@ public:
virtual void delayMillis(uint msecs);
virtual void getTimeAndDate(TimeDate &t) const {}
+ virtual void quit();
+
virtual void logMessage(LogMessageType::Type type, const char *message);
};
@@ -115,6 +118,10 @@ uint32 OSystem_NULL::getMillis(bool skipRecord) {
void OSystem_NULL::delayMillis(uint msecs) {
}
+void OSystem_NULL::quit() {
+ exit(0);
+}
+
void OSystem_NULL::logMessage(LogMessageType::Type type, const char *message) {
FILE *output = 0;
diff --git a/backends/platform/tizen/system.cpp b/backends/platform/tizen/system.cpp
index 23b07187bb..7fe45f574e 100644
--- a/backends/platform/tizen/system.cpp
+++ b/backends/platform/tizen/system.cpp
@@ -20,6 +20,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_exit
+
#include <FUiCtrlMessageBox.h>
#include <FLocales.h>
@@ -454,6 +456,10 @@ void TizenSystem::exitSystem() {
}
}
+void TizenSystem::quit() {
+ exit(0);
+}
+
void TizenSystem::logMessage(LogMessageType::Type type, const char *message) {
if (type == LogMessageType::kError) {
systemError(message);
diff --git a/backends/platform/tizen/system.h b/backends/platform/tizen/system.h
index 3f668baf34..f788280ba4 100644
--- a/backends/platform/tizen/system.h
+++ b/backends/platform/tizen/system.h
@@ -86,6 +86,7 @@ private:
void delayMillis(uint msecs);
void getTimeAndDate(TimeDate &t) const;
void fatalError();
+ void quit();
void logMessage(LogMessageType::Type type, const char *message);
void addSysArchivesToSearchSet(Common::SearchSet &s, int priority);