aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-10-18 03:52:21 +0000
committerEugene Sandulenko2005-10-18 03:52:21 +0000
commitb725a206c0c0eda1a508a994ffa28fcd7f3894ac (patch)
tree3841b08de96deb199173e48fc2b23c7e6f3abe9a
parentb34013de97a4d11c208319deb399dd7a30439bf8 (diff)
downloadscummvm-rg350-b725a206c0c0eda1a508a994ffa28fcd7f3894ac.tar.gz
scummvm-rg350-b725a206c0c0eda1a508a994ffa28fcd7f3894ac.tar.bz2
scummvm-rg350-b725a206c0c0eda1a508a994ffa28fcd7f3894ac.zip
Add possibility to disable SDL parachute on run-time. Option
--disable-sdl-parachute should be completely undocumented and not mentioned to end-users. Wrong usage may lead to system lock-up especially when used with fullscreen mode. SDL Parachute is used to prevent system instability and do a graceful exit if something bad happens. It catches most of signals sent to thr process. Side effect of that that quite often when SDL application dies, core dump isn't made on *nix systems. This feature adds possibility to disable it. svn-id: r19146
-rw-r--r--backends/sdl/sdl.cpp3
-rw-r--r--base/gameDetector.cpp5
2 files changed, 8 insertions, 0 deletions
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp
index 4878833921..20519d4d2e 100644
--- a/backends/sdl/sdl.cpp
+++ b/backends/sdl/sdl.cpp
@@ -41,6 +41,9 @@ void OSystem_SDL::initBackend() {
int joystick_num = ConfMan.getInt("joystick_num");
uint32 sdlFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
+ if (ConfMan.hasKey("disable_sdl_parachute"))
+ sdlFlags |= SDL_INIT_NOPARACHUTE;
+
#ifdef _WIN32_WCE
if (ConfMan.hasKey("use_GDI") && ConfMan.getBool("use_GDI")) {
SDL_VideoInit("windib", 0);
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index 53f225b576..1fcb78c030 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -166,6 +166,7 @@ GameDetector::GameDetector() {
// Miscellaneous
ConfMan.registerDefault("joystick_num", -1);
ConfMan.registerDefault("confirm_exit", false);
+ ConfMan.registerDefault("disable_sdl_parachute", false);
#ifdef USE_ALSA
ConfMan.registerDefault("alsa_port", "65:0");
#endif
@@ -501,6 +502,10 @@ void GameDetector::parseCommandLine(int argc, char **argv) {
settings["soundfont"] = option;
END_OPTION
+ DO_LONG_OPTION_BOOL("disable-sdl-parachute")
+ settings["disable_sdl_parachute"] = boolValue ? "true" : "false";
+ END_OPTION
+
DO_LONG_OPTION_BOOL("multi-midi")
settings["multi_midi"] = boolValue ? "true" : "false";
END_OPTION