diff options
author | James Brown | 2002-11-25 09:43:22 +0000 |
---|---|---|
committer | James Brown | 2002-11-25 09:43:22 +0000 |
commit | 850428d1a500c5c01e4aa5b31cd8092fa66a991f (patch) | |
tree | 6092f412ac46268d260e80f09d307c395fc7b265 | |
parent | efb40c99e8fb791ac041d9e13c55e1a70b193cca (diff) | |
download | scummvm-rg350-850428d1a500c5c01e4aa5b31cd8092fa66a991f.tar.gz scummvm-rg350-850428d1a500c5c01e4aa5b31cd8092fa66a991f.tar.bz2 scummvm-rg350-850428d1a500c5c01e4aa5b31cd8092fa66a991f.zip |
Add a few EditGame options. Honor game-specific fullScreen from the Launcher
svn-id: r5715
-rw-r--r-- | gui/launcher.cpp | 11 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 278759760f..0d6a3b5e86 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -81,6 +81,8 @@ protected: const String &_domain; EditTextWidget *_descriptionWidget; EditTextWidget *_domainWidget; + CheckboxWidget *_fullscreenCheckbox; + CheckboxWidget *_AmigaPalCheckbox; }; EditGameDialog::EditGameDialog(NewGui *gui, Config &config, const String &domain) @@ -118,10 +120,17 @@ EditGameDialog::EditGameDialog(NewGui *gui, Config &config, const String &domain new StaticTextWidget(this, 50, 42, _w-50-10, kLineHeight, path, kTextAlignLeft); // TODO - insert more widgets here; see comments before the class + _fullscreenCheckbox = new CheckboxWidget(this, 15, 62, 200, 16, "Use Fullscreen Mode", 0, 'F'); + _AmigaPalCheckbox = new CheckboxWidget(this, 15, 82, 200, 16, "Use Amiga Palette", 0, 'A'); // Add OK & Cancel buttons addButton(_w-2*(kButtonWidth+10), _h-24, "Cancel", kCloseCmd, 0); addButton(_w-(kButtonWidth+10), _h-24, "OK", kOKCmd, 0); + + // Load in settings for the checkboxs + _fullscreenCheckbox->setState(_config.getBool("fullscreen", false, _domain)); + _AmigaPalCheckbox->setState(_config.getBool("amiga", false, _domain)); + } void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) @@ -138,6 +147,8 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat _config.rename_domain(_domain, newDomain); } _config.set("description", _descriptionWidget->getLabel(), newDomain); + _config.setBool("amiga", _AmigaPalCheckbox->getState(), newDomain); + _config.setBool("fullscreen", _fullscreenCheckbox->getState(), newDomain); setResult(1); close(); } else { diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 06579fbbce..b674c6556e 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -36,6 +36,7 @@ #include "object.h" #include "resource.h" #include "string.h" +#include "common/config-file.h" #ifdef _WIN32_WCE extern void drawError(char*); @@ -144,6 +145,11 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) if (prop.cd_num >= 0 && (_features & GF_AUDIOTRACKS)) syst->property(OSystem::PROP_OPEN_CD, &prop); + if (g_config->getBool("fullscreen", false)) { + if (!_system->property(OSystem::PROP_GET_FULLSCREEN, 0)) + _system->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0); + } + /* Bind the mixer to the system => mixer will be invoked * automatically when samples need to be generated */ _silentDigitalImuse = false; |