Removed all references to stella.pro locations from configure and Makefile

scripts, since the properties are now built in, and will never need a
global storage directory.

Reworked the ROM launcher again, by moving the 'Reload' button to the
Launcher options dialog (by popular request from the GP2X forums).  The
'Go Up' button is now always present on the main launcher interface, but
is disabled when not in 'rom browse' mode.

Added a button to VideoDialog for the recently added 'tiadefaults'
functionality.  It defaults to off, which is the current behaviour in
Stella.  (De)selecting this item will require a ROM reload.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1058 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2006-03-19 20:57:55 +00:00
parent de5af204cf
commit 893644c703
9 changed files with 84 additions and 39 deletions

View File

@ -13,7 +13,7 @@
## See the file "license" for information on usage and redistribution of ## See the file "license" for information on usage and redistribution of
## this file, and for a DISCLAIMER OF ALL WARRANTIES. ## this file, and for a DISCLAIMER OF ALL WARRANTIES.
## ##
## $Id: Makefile,v 1.22 2006-03-11 21:34:37 stephena Exp $ ## $Id: Makefile,v 1.23 2006-03-19 20:57:54 stephena Exp $
## ##
## Based on code from ScummVM - Scumm Interpreter ## Based on code from ScummVM - Scumm Interpreter
## Copyright (C) 2002-2004 The ScummVM project ## Copyright (C) 2002-2004 The ScummVM project
@ -171,14 +171,12 @@ install: all
$(INSTALL) -d "$(DESTDIR)$(BINDIR)" $(INSTALL) -d "$(DESTDIR)$(BINDIR)"
$(INSTALL) -c -s -m 755 "$(srcdir)/stella$(EXEEXT)" "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)" $(INSTALL) -c -s -m 755 "$(srcdir)/stella$(EXEEXT)" "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)" $(INSTALL) -d "$(DESTDIR)$(DOCDIR)"
$(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-PSP.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/stella.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/" $(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/index.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/"
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics" $(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics"
$(INSTALL) -c -m 644 "$(srcdir)/docs/graphics/chucky_cheese.png" "$(srcdir)/docs/graphics/circuit.png" "$(srcdir)/docs/graphics/console.png" "$(srcdir)/docs/graphics/eventmapping.png" "$(srcdir)/docs/graphics/eventmapping_remap.png" "$(srcdir)/docs/graphics/jr_pacman.png" "$(srcdir)/docs/graphics/launcher_options_rom.png" "$(srcdir)/docs/graphics/launcher_options_snap.png" "$(srcdir)/docs/graphics/launcher.png" "$(srcdir)/docs/graphics/options_about.png" "$(srcdir)/docs/graphics/options_audio.png" "$(srcdir)/docs/graphics/options_gameinfo.png" "$(srcdir)/docs/graphics/options_help.png" "$(srcdir)/docs/graphics/options_video.png" "$(srcdir)/docs/graphics/pacman.png" "$(srcdir)/docs/graphics/rom_browser.png" "$(srcdir)/docs/graphics/secret_quest.png" "$(srcdir)/docs/graphics/space_invaders.png" "$(DESTDIR)$(DOCDIR)/graphics" $(INSTALL) -c -m 644 "$(srcdir)/docs/graphics/chucky_cheese.png" "$(srcdir)/docs/graphics/circuit.png" "$(srcdir)/docs/graphics/console.png" "$(srcdir)/docs/graphics/eventmapping.png" "$(srcdir)/docs/graphics/eventmapping_remap.png" "$(srcdir)/docs/graphics/jr_pacman.png" "$(srcdir)/docs/graphics/launcher_options_rom.png" "$(srcdir)/docs/graphics/launcher_options_snap.png" "$(srcdir)/docs/graphics/launcher.png" "$(srcdir)/docs/graphics/options_about.png" "$(srcdir)/docs/graphics/options_audio.png" "$(srcdir)/docs/graphics/options_gameinfo.png" "$(srcdir)/docs/graphics/options_help.png" "$(srcdir)/docs/graphics/options_video.png" "$(srcdir)/docs/graphics/pacman.png" "$(srcdir)/docs/graphics/rom_browser.png" "$(srcdir)/docs/graphics/secret_quest.png" "$(srcdir)/docs/graphics/space_invaders.png" "$(DESTDIR)$(DOCDIR)/graphics"
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons" $(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons"
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella.xpm" "$(DESTDIR)$(DATADIR)/icons" $(INSTALL) -c -m 644 "$(srcdir)/src/common/stella.xpm" "$(DESTDIR)$(DATADIR)/icons"
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/stella"
# $(INSTALL) -c -m 644 "$(srcdir)/src/emucore/stella.pro" "$(DESTDIR)$(DATADIR)/stella"
@echo $(PROPDIR)
install-strip: install install-strip: install
strip stella$(EXEEXT) strip stella$(EXEEXT)
@ -186,7 +184,6 @@ uninstall:
rm -f "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)" rm -f "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
rm -rf "$(DESTDIR)$(DOCDIR)/" rm -rf "$(DESTDIR)$(DOCDIR)/"
rm -f "$(DESTDIR)$(DATADIR)/icons/stella.xpm" rm -f "$(DESTDIR)$(DATADIR)/icons/stella.xpm"
rm -rf "$(DESTDIR)$(DATADIR)/stella"
# Special rule for Win32 icon stuff (there's probably a better way to do this ...) # Special rule for Win32 icon stuff (there's probably a better way to do this ...)
src/win32/stella_icon.o: src/win32/stella.ico src/win32/stella.rc src/win32/stella_icon.o: src/win32/stella.ico src/win32/stella.rc
@ -197,8 +194,7 @@ win32dist: stella$(EXEEXT)
rm -rf $(DISTNAME) rm -rf $(DISTNAME)
mkdir -p $(DISTNAME)/docs/graphics mkdir -p $(DISTNAME)/docs/graphics
strip stella$(EXEEXT) -o $(DISTNAME)/stella$(EXEEXT) strip stella$(EXEEXT) -o $(DISTNAME)/stella$(EXEEXT)
# cp src/emucore/stella.pro $(DISTNAME) cp Announce.txt Changes.txt Copyright.txt License.txt README-SDL.txt Readme.txt Todo.txt $(DISTNAME)/docs
cp Announce.txt Changes.txt Copyright.txt License.txt README-PSP.txt README-SDL.txt Readme.txt Todo.txt $(DISTNAME)/docs
cp -r docs/*.html $(DISTNAME)/docs cp -r docs/*.html $(DISTNAME)/docs
cp -r docs/graphics/*.png $(DISTNAME)/docs/graphics cp -r docs/graphics/*.png $(DISTNAME)/docs/graphics
cp /usr/bin/SDL.dll /mingw/bin/libpng12.dll /mingw/bin/zlib1.dll $(DISTNAME) cp /usr/bin/SDL.dll /mingw/bin/libpng12.dll /mingw/bin/zlib1.dll $(DISTNAME)
@ -250,7 +246,6 @@ gp2x-organize:
mkdir -p "$(srcdir)/gp2x/docs" mkdir -p "$(srcdir)/gp2x/docs"
cp -v $(srcdir)/stella $(srcdir)/gp2x cp -v $(srcdir)/stella $(srcdir)/gp2x
cp -v $(srcdir)/src/gp2x/stella.gpe $(srcdir)/gp2x cp -v $(srcdir)/src/gp2x/stella.gpe $(srcdir)/gp2x
# cp -v $(srcdir)/src/emucore/stella.pro $(srcdir)/gp2x
cp -v $(srcdir)/README-GP2X.txt $(srcdir)/gp2x cp -v $(srcdir)/README-GP2X.txt $(srcdir)/gp2x
cp -v -r $(srcdir)/docs/* $(srcdir)/gp2x/docs cp -v -r $(srcdir)/docs/* $(srcdir)/gp2x/docs

3
stella/configure vendored
View File

@ -793,9 +793,6 @@ case $_host_os in
if test "$_build_gl" = yes ; then if test "$_build_gl" = yes ; then
DEFINES="$DEFINES -DDISPLAY_OPENGL" DEFINES="$DEFINES -DDISPLAY_OPENGL"
fi fi
# Add properties directory
PROPDIR="$_datadir/stella"
DEFINES="$DEFINES -DPROPDIR=\"\\\"$PROPDIR\\\"\""
;; ;;
win32) win32)
DEFINES="$DEFINES -DBSPF_WIN32 -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES" DEFINES="$DEFINES -DBSPF_WIN32 -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: LauncherDialog.cxx,v 1.48 2006-03-19 18:17:48 stephena Exp $ // $Id: LauncherDialog.cxx,v 1.49 2006-03-19 20:57:55 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -45,7 +45,7 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
int x, int y, int w, int h) int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h), : Dialog(osystem, parent, x, y, w, h),
myStartButton(NULL), myStartButton(NULL),
myRelPrevButton(NULL), myPrevDirButton(NULL),
myOptionsButton(NULL), myOptionsButton(NULL),
myQuitButton(NULL), myQuitButton(NULL),
myList(NULL), myList(NULL),
@ -104,10 +104,10 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
myStartButton->setEditable(true); myStartButton->setEditable(true);
wid.push_back(myStartButton); wid.push_back(myStartButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myRelPrevButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myPrevDirButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"", kRelPrevCmd, 0); "Go Up", kPrevDirCmd, 0);
myRelPrevButton->setEditable(true); myPrevDirButton->setEditable(true);
wid.push_back(myRelPrevButton); wid.push_back(myPrevDirButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myOptionsButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myOptionsButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Options", kOptionsCmd, 0); "Options", kOptionsCmd, 0);
@ -131,10 +131,10 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
myOptionsButton->setEditable(true); myOptionsButton->setEditable(true);
wid.push_back(myOptionsButton); wid.push_back(myOptionsButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myRelPrevButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myPrevDirButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"", kRelPrevCmd, 0); "Go Up", kPrevDirCmd, 0);
myRelPrevButton->setEditable(true); myPrevDirButton->setEditable(true);
wid.push_back(myRelPrevButton); wid.push_back(myPrevDirButton);
xpos += bwidth + 8; xpos += bwidth + 8;
myStartButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight, myStartButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Select", kStartCmd, 0); "Select", kStartCmd, 0);
@ -157,7 +157,7 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
// (De)activate browse mode // (De)activate browse mode
myBrowseModeFlag = instance()->settings().getBool("rombrowse"); myBrowseModeFlag = instance()->settings().getBool("rombrowse");
myRelPrevButton->setLabel(myBrowseModeFlag ? "Go Up" : "Reload"); myPrevDirButton->setEnabled(myBrowseModeFlag);
myNoteLabel->setEnabled(!myBrowseModeFlag); myNoteLabel->setEnabled(!myBrowseModeFlag);
} }
@ -183,7 +183,7 @@ void LauncherDialog::loadConfig()
void LauncherDialog::enableButtons(bool enable) void LauncherDialog::enableButtons(bool enable)
{ {
myStartButton->setEnabled(enable); myStartButton->setEnabled(enable);
myRelPrevButton->setEnabled(enable); myPrevDirButton->setEnabled(enable && myBrowseModeFlag);
myOptionsButton->setEnabled(enable); myOptionsButton->setEnabled(enable);
myQuitButton->setEnabled(enable); myQuitButton->setEnabled(enable);
} }
@ -512,7 +512,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
parent()->addDialog(myOptions); parent()->addDialog(myOptions);
break; break;
case kRelPrevCmd: case kPrevDirCmd:
{ {
FilesystemNode dir(myCurrentDir); FilesystemNode dir(myCurrentDir);
myCurrentDir = dir.getParent().path(); myCurrentDir = dir.getParent().path();
@ -536,12 +536,20 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
updateListing(); updateListing();
break; break;
case kSnapDirChosenCmd:
// Stub just in case we need it
break;
case kBrowseChangedCmd: case kBrowseChangedCmd:
myBrowseModeFlag = instance()->settings().getBool("rombrowse"); myBrowseModeFlag = instance()->settings().getBool("rombrowse");
myRelPrevButton->setLabel(myBrowseModeFlag ? "Go Up" : "Reload"); myPrevDirButton->setEnabled(myBrowseModeFlag);
myNoteLabel->setEnabled(!myBrowseModeFlag); myNoteLabel->setEnabled(!myBrowseModeFlag);
break; break;
case kReloadRomDirCmd:
updateListing(true);
break;
default: default:
Dialog::handleCommand(sender, cmd, data, 0); Dialog::handleCommand(sender, cmd, data, 0);
} }

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: LauncherDialog.hxx,v 1.18 2006-03-19 18:17:48 stephena Exp $ // $Id: LauncherDialog.hxx,v 1.19 2006-03-19 20:57:55 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -35,12 +35,12 @@ class OSystem;
#include "GameList.hxx" #include "GameList.hxx"
#include "bspf.hxx" #include "bspf.hxx"
// These must be accessible from LauncherOptionsDialog
enum { enum {
kChooseRomDirCmd = 'roms', // rom select
kChooseSnapDirCmd = 'snps', // snap select
kRomDirChosenCmd = 'romc', // rom chosen kRomDirChosenCmd = 'romc', // rom chosen
kSnapDirChosenCmd = 'snpc', // snap chosen kSnapDirChosenCmd = 'snpc', // snap chosen
kBrowseChangedCmd = 'broc' // browse mode toggled kBrowseChangedCmd = 'broc', // browse mode toggled
kReloadRomDirCmd = 'rdrl' // reload the current listing
}; };
class LauncherDialog : public Dialog class LauncherDialog : public Dialog
@ -62,7 +62,7 @@ class LauncherDialog : public Dialog
protected: protected:
ButtonWidget* myStartButton; ButtonWidget* myStartButton;
ButtonWidget* myRelPrevButton; ButtonWidget* myPrevDirButton;
ButtonWidget* myOptionsButton; ButtonWidget* myOptionsButton;
ButtonWidget* myQuitButton; ButtonWidget* myQuitButton;
@ -90,7 +90,7 @@ class LauncherDialog : public Dialog
enum { enum {
kStartCmd = 'STRT', kStartCmd = 'STRT',
kRelPrevCmd = 'REPV', kPrevDirCmd = 'PRVD',
kOptionsCmd = 'OPTI', kOptionsCmd = 'OPTI',
kQuitCmd = 'QUIT' kQuitCmd = 'QUIT'
}; };

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: LauncherOptionsDialog.cxx,v 1.15 2006-03-09 17:04:01 stephena Exp $ // $Id: LauncherOptionsDialog.cxx,v 1.16 2006-03-19 20:57:55 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -62,7 +62,15 @@ LauncherOptionsDialog::LauncherOptionsDialog(
// Use ROM browse mode // Use ROM browse mode
xpos = 30; ypos += myRomPath->getHeight() + 8; xpos = 30; ypos += myRomPath->getHeight() + 8;
myBrowseCheckbox = new CheckboxWidget(myTab, font, xpos, ypos, myBrowseCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
"Browse folders"); "Browse folders", kBrowseDirCmd);
// Reload current ROM listing
xpos += myBrowseCheckbox->getWidth() + 20;
myReloadButton = new ButtonWidget(myTab, font, xpos, ypos-2,
font.getStringWidth("Reload ROM Listing") + 20,
bheight,
"Reload ROM Listing", kReloadRomDirCmd, 0);
// 2) The snapshot settings tab // 2) The snapshot settings tab
myTab->addTab(" Snapshot Settings "); myTab->addTab(" Snapshot Settings ");
@ -134,6 +142,7 @@ void LauncherOptionsDialog::loadConfig()
b = instance()->settings().getBool("rombrowse"); b = instance()->settings().getBool("rombrowse");
myBrowseCheckbox->setState(b); myBrowseCheckbox->setState(b);
myReloadButton->setEnabled(!b);
s = instance()->settings().getString("ssdir"); s = instance()->settings().getString("ssdir");
mySnapPath->setLabel(s); mySnapPath->setLabel(s);
@ -218,6 +227,12 @@ void LauncherOptionsDialog::handleCommand(CommandSender* sender, int cmd,
openSnapBrowser(); openSnapBrowser();
break; break;
/*
case kBrowseDirCmd:
myReloadButton->setEnabled(!myBrowseCheckbox->getState());
break;
*/
case kRomDirChosenCmd: case kRomDirChosenCmd:
{ {
FilesystemNode dir(myBrowser->getResult()); FilesystemNode dir(myBrowser->getResult());
@ -232,6 +247,12 @@ void LauncherOptionsDialog::handleCommand(CommandSender* sender, int cmd,
break; break;
} }
case kReloadRomDirCmd:
{
sendCommand(kReloadRomDirCmd, 0, 0);
break;
}
default: default:
Dialog::handleCommand(sender, cmd, data, 0); Dialog::handleCommand(sender, cmd, data, 0);
break; break;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: LauncherOptionsDialog.hxx,v 1.9 2006-03-09 17:04:01 stephena Exp $ // $Id: LauncherOptionsDialog.hxx,v 1.10 2006-03-19 20:57:55 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -54,6 +54,7 @@ class LauncherOptionsDialog : public Dialog, public CommandSender
// Rom path controls // Rom path controls
StaticTextWidget* myRomPath; StaticTextWidget* myRomPath;
CheckboxWidget* myBrowseCheckbox; CheckboxWidget* myBrowseCheckbox;
ButtonWidget* myReloadButton;
// Snapshot controls // Snapshot controls
StaticTextWidget* mySnapPath; StaticTextWidget* mySnapPath;
@ -61,6 +62,12 @@ class LauncherOptionsDialog : public Dialog, public CommandSender
CheckboxWidget* mySnapSingleCheckbox; CheckboxWidget* mySnapSingleCheckbox;
private: private:
enum {
kChooseRomDirCmd = 'LOrm', // rom select
kChooseSnapDirCmd = 'LOsn', // snap select
kBrowseDirCmd = 'LObd' // browse mode
};
void openRomBrowser(); void openRomBrowser();
void openSnapBrowser(); void openSnapBrowser();
}; };

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: OptionsDialog.cxx,v 1.36 2006-02-22 17:38:04 stephena Exp $ // $Id: OptionsDialog.cxx,v 1.37 2006-03-19 20:57:55 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -104,7 +104,7 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent)
int x, y, w, h; int x, y, w, h;
// Now create all the dialogs attached to each menu button // Now create all the dialogs attached to each menu button
w = 230; h = 130; w = 230; h = 135;
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h); checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
myVideoDialog = new VideoDialog(myOSystem, parent, font, x, y, w, h); myVideoDialog = new VideoDialog(myOSystem, parent, font, x, y, w, h);

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: VideoDialog.cxx,v 1.27 2006-02-22 17:38:04 stephena Exp $ // $Id: VideoDialog.cxx,v 1.28 2006-03-19 20:57:55 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -122,6 +122,11 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
myUseDeskResCheckbox = new CheckboxWidget(this, font, xpos + 5, ypos, myUseDeskResCheckbox = new CheckboxWidget(this, font, xpos + 5, ypos,
"Desktop Res in FS"); "Desktop Res in FS");
ypos += lineHeight + 4;
myTiaDefaultsCheckbox = new CheckboxWidget(this, font, xpos + 5, ypos,
"Use TIA defaults");
ypos += lineHeight + 20; ypos += lineHeight + 20;
// Add Defaults, OK and Cancel buttons // Add Defaults, OK and Cancel buttons
@ -210,6 +215,10 @@ void VideoDialog::loadConfig()
b = instance()->settings().getBool("gl_fsmax"); b = instance()->settings().getBool("gl_fsmax");
myUseDeskResCheckbox->setState(b); myUseDeskResCheckbox->setState(b);
// Use TIA defaults instead of tweaked values
b = instance()->settings().getBool("tiadefaults");
myTiaDefaultsCheckbox->setState(b);
// Make sure that mutually-exclusive items are not enabled at the same time // Make sure that mutually-exclusive items are not enabled at the same time
i = myRendererPopup->getSelectedTag() - 1; i = myRendererPopup->getSelectedTag() - 1;
handleRendererChange(i); handleRendererChange(i);
@ -299,6 +308,12 @@ void VideoDialog::saveConfig()
restart = true; restart = true;
} }
// Use TIA defaults instead of tweaked values
b = myTiaDefaultsCheckbox->getState();
instance()->settings().setBool("tiadefaults", b);
myTiaDefaultsCheckbox->setState(b);
// Finally, issue a complete framebuffer re-initialization // Finally, issue a complete framebuffer re-initialization
// Not all options may require a full re-initialization, so we only // Not all options may require a full re-initialization, so we only
// do it when necessary // do it when necessary
@ -325,6 +340,7 @@ void VideoDialog::setDefaults()
myFullscreenCheckbox->setState(false); myFullscreenCheckbox->setState(false);
myUseDeskResCheckbox->setState(true); myUseDeskResCheckbox->setState(true);
myTiaDefaultsCheckbox->setState(false);
// Make sure that mutually-exclusive items are not enabled at the same time // Make sure that mutually-exclusive items are not enabled at the same time
handleRendererChange(0); // 0 indicates software mode handleRendererChange(0); // 0 indicates software mode

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: VideoDialog.hxx,v 1.11 2006-02-22 17:38:04 stephena Exp $ // $Id: VideoDialog.hxx,v 1.12 2006-03-19 20:57:55 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -60,6 +60,7 @@ class VideoDialog : public Dialog
StaticTextWidget* myZoomLabel; StaticTextWidget* myZoomLabel;
CheckboxWidget* myFullscreenCheckbox; CheckboxWidget* myFullscreenCheckbox;
CheckboxWidget* myUseDeskResCheckbox; CheckboxWidget* myUseDeskResCheckbox;
CheckboxWidget* myTiaDefaultsCheckbox;
private: private:
void loadConfig(); void loadConfig();