mirror of https://github.com/stella-emu/stella.git
Oops, forgot to add UI objects to change fullscreen resolution.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1325 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
66eff3b9d8
commit
7e5d519234
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DebuggerDialog.cxx,v 1.18 2007-01-01 18:04:43 stephena Exp $
|
||||
// $Id: DebuggerDialog.cxx,v 1.19 2007-06-21 12:27:00 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -293,5 +293,5 @@ void DebuggerDialog::doScanlineAdvance()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DebuggerDialog::doExit()
|
||||
{
|
||||
instance()->debugger().quit();
|
||||
instance()->debugger().parser()->run("run");
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: PromptWidget.cxx,v 1.15 2007-01-01 18:04:44 stephena Exp $
|
||||
// $Id: PromptWidget.cxx,v 1.16 2007-06-21 12:27:00 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -188,7 +188,8 @@ bool PromptWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
addToHistory(command.c_str());
|
||||
|
||||
// Pass the command to the debugger, and print the result
|
||||
print( instance()->debugger().run(command) + "\n");
|
||||
string result = instance()->debugger().run(command) + "\n";
|
||||
print( result );
|
||||
}
|
||||
|
||||
printPrompt();
|
||||
|
@ -211,9 +212,11 @@ bool PromptWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
char delimiter = '\0';
|
||||
|
||||
char *str = new char[len + 1];
|
||||
for (i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
str[i] = buffer(_promptStartPos + i) & 0x7f;
|
||||
if(strchr("*@<> ", str[i]) != NULL ) {
|
||||
if(strchr("*@<> ", str[i]) != NULL )
|
||||
{
|
||||
lastDelimPos = i;
|
||||
delimiter = str[i];
|
||||
}
|
||||
|
@ -224,7 +227,8 @@ bool PromptWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
const char *prefix;
|
||||
int possibilities;
|
||||
|
||||
if(lastDelimPos < 0) {
|
||||
if(lastDelimPos < 0)
|
||||
{
|
||||
// no delimiters, do command completion:
|
||||
DebuggerParser *parser = instance()->debugger().parser();
|
||||
possibilities = parser->countCompletions(str);
|
||||
|
@ -236,7 +240,9 @@ bool PromptWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
|
||||
completionList = parser->getCompletions();
|
||||
prefix = parser->getCompletionPrefix();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// we got a delimiter, so this must be a label:
|
||||
EquateList *equates = instance()->debugger().equates();
|
||||
possibilities = equates->countCompletions(str + lastDelimPos + 1);
|
||||
|
@ -250,15 +256,18 @@ bool PromptWidget::handleKeyDown(int ascii, int keycode, int modifiers)
|
|||
prefix = equates->getCompletionPrefix();
|
||||
}
|
||||
|
||||
if(possibilities == 1) {
|
||||
if(possibilities == 1)
|
||||
{
|
||||
// add to buffer as though user typed it (plus a space)
|
||||
_currentPos = _promptStartPos + lastDelimPos + 1;
|
||||
while(*completionList != '\0') {
|
||||
while(*completionList != '\0')
|
||||
putcharIntern(*completionList++);
|
||||
}
|
||||
|
||||
putcharIntern(' ');
|
||||
_promptEndPos = _currentPos;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
nextLine();
|
||||
// add to buffer as-is, then add PROMPT plus whatever we have so far
|
||||
_currentPos = _promptStartPos + lastDelimPos + 1;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: M6532.cxx,v 1.9 2007-01-01 18:04:48 stephena Exp $
|
||||
// $Id: M6532.cxx,v 1.10 2007-06-21 12:27:00 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -238,6 +238,7 @@ void M6532::poke(uInt16 addr, uInt8 value)
|
|||
else if((addr & 0x07) == 0x01) // Port A Data Direction Register
|
||||
{
|
||||
myDDRA = value;
|
||||
#ifdef ATARIVOX_SUPPORT
|
||||
/*
|
||||
20060608 bkw: Not the most elegant thing in the world...
|
||||
When a bit in the DDR is set as input, +5V is placed on its output
|
||||
|
@ -262,6 +263,7 @@ void M6532::poke(uInt16 addr, uInt8 value)
|
|||
c.write(Controller::Three, !(value & 0x04));
|
||||
c.write(Controller::Four, !(value & 0x08));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if((addr & 0x07) == 0x02) // Port B I/O Register (Console switches)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: OptionsDialog.cxx,v 1.52 2007-06-20 16:33:23 stephena Exp $
|
||||
// $Id: OptionsDialog.cxx,v 1.53 2007-06-21 12:27:00 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -107,7 +107,7 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent,
|
|||
int x = 0, y = 0, w, h;
|
||||
|
||||
// Now create all the dialogs attached to each menu button
|
||||
w = 230; h = 150;
|
||||
w = 230; h = 165;
|
||||
myVideoDialog = new VideoDialog(myOSystem, parent, font, x, y, w, h);
|
||||
|
||||
w = 200; h = 140;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: PopUpWidget.cxx,v 1.32 2007-01-01 18:04:54 stephena Exp $
|
||||
// $Id: PopUpWidget.cxx,v 1.33 2007-06-21 12:27:00 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -509,6 +509,19 @@ void PopUpWidget::setSelected(int item)
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PopUpWidget::setSelectedName(const string& name)
|
||||
{
|
||||
for(unsigned int item = 0; item < _entries.size(); ++item)
|
||||
{
|
||||
if(_entries[item].name == name)
|
||||
{
|
||||
setSelected(item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PopUpWidget::setSelectedTag(int tag)
|
||||
{
|
||||
|
@ -522,6 +535,12 @@ void PopUpWidget::setSelectedTag(int tag)
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PopUpWidget::setSelectedMax()
|
||||
{
|
||||
setSelected(_entries.size() - 1);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PopUpWidget::drawWidget(bool hilite)
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: PopUpWidget.hxx,v 1.17 2007-01-01 18:04:54 stephena Exp $
|
||||
// $Id: PopUpWidget.hxx,v 1.18 2007-06-21 12:27:00 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -72,9 +72,15 @@ class PopUpWidget : public Widget, public CommandSender
|
|||
/** Select the entry at the given index. */
|
||||
void setSelected(int item);
|
||||
|
||||
/** Select the first entry matching the given name. */
|
||||
void setSelectedName(const string& name);
|
||||
|
||||
/** Select the first entry matching the given tag. */
|
||||
void setSelectedTag(int tag);
|
||||
|
||||
/** Select the highest/last entry in the internal list. */
|
||||
void setSelectedMax();
|
||||
|
||||
int getSelected() const
|
||||
{ return _selectedItem; }
|
||||
int getSelectedTag() const
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: VideoDialog.cxx,v 1.43 2007-06-20 16:33:23 stephena Exp $
|
||||
// $Id: VideoDialog.cxx,v 1.44 2007-06-21 12:27:00 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -86,6 +86,14 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
|
|||
wid.push_back(myPalettePopup);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
// Fullscreen resolution
|
||||
myFSResPopup = new PopUpWidget(this, font, xpos, ypos, pwidth,
|
||||
lineHeight, "FS Res: ", lwidth);
|
||||
for(uInt32 i = 0; i < instance()->supportedResolutions().size(); ++i)
|
||||
myFSResPopup->appendEntry(instance()->supportedResolutions()[i].name, i+1);
|
||||
wid.push_back(myFSResPopup);
|
||||
ypos += lineHeight + 4;
|
||||
|
||||
// Available UI zoom levels
|
||||
myUIZoomSlider = new SliderWidget(this, font, xpos, ypos, pwidth, lineHeight,
|
||||
"UI Zoom: ", lwidth, kUIZoomChanged);
|
||||
|
@ -229,6 +237,12 @@ void VideoDialog::loadConfig()
|
|||
else if(s == "z26") myPalettePopup->setSelectedTag(3);
|
||||
else if(s == "user") myPalettePopup->setSelectedTag(4);
|
||||
|
||||
// Fullscreen resolution
|
||||
s = instance()->settings().getString("fullres");
|
||||
myFSResPopup->setSelectedName(s);
|
||||
if(myFSResPopup->getSelectedTag() < 0)
|
||||
myFSResPopup->setSelectedMax();
|
||||
|
||||
// UI zoom level
|
||||
s = instance()->settings().getString("zoom_ui");
|
||||
i = instance()->settings().getInt("zoom_ui");
|
||||
|
@ -293,12 +307,6 @@ void VideoDialog::saveConfig()
|
|||
else if(i == 4) s = "always";
|
||||
instance()->settings().setString("gl_fsmax", s);
|
||||
|
||||
/*
|
||||
// Aspect ratio
|
||||
s = myAspectRatioLabel->getLabel();
|
||||
instance()->settings().setString("gl_aspect", s);
|
||||
*/
|
||||
|
||||
// Palette
|
||||
i = myPalettePopup->getSelectedTag();
|
||||
if(i == 1) s = "standard";
|
||||
|
@ -307,6 +315,10 @@ void VideoDialog::saveConfig()
|
|||
else if(i == 4) s = "user";
|
||||
instance()->settings().setString("palette", s);
|
||||
|
||||
// Fullscreen resolution
|
||||
s = myFSResPopup->getSelectedString();
|
||||
instance()->settings().setString("fullres", s);
|
||||
|
||||
// UI Scaler
|
||||
s = myUIZoomLabel->getLabel();
|
||||
instance()->settings().setString("zoom_ui", s);
|
||||
|
@ -349,6 +361,7 @@ void VideoDialog::setDefaults()
|
|||
myFilterPopup->setSelectedTag(1);
|
||||
myFSStretchPopup->setSelectedTag(1);
|
||||
myPalettePopup->setSelectedTag(1);
|
||||
myFSResPopup->setSelectedMax();
|
||||
myUIZoomSlider->setValue(2);
|
||||
myUIZoomLabel->setLabel("2");
|
||||
myTIAZoomSlider->setValue(2);
|
||||
|
@ -386,6 +399,8 @@ void VideoDialog::handleRendererChange(int item)
|
|||
void VideoDialog::handleFullscreenChange(bool enable)
|
||||
{
|
||||
#ifdef WINDOWED_SUPPORT
|
||||
myFSResPopup->setEnabled(enable);
|
||||
|
||||
myUIZoomSlider->setEnabled(!enable);
|
||||
myUIZoomLabel->setEnabled(!enable);
|
||||
myTIAZoomSlider->setEnabled(!enable);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: VideoDialog.hxx,v 1.20 2007-06-20 16:33:23 stephena Exp $
|
||||
// $Id: VideoDialog.hxx,v 1.21 2007-06-21 12:27:00 stephena Exp $
|
||||
//
|
||||
// Based on code from ScummVM - Scumm Interpreter
|
||||
// Copyright (C) 2002-2004 The ScummVM project
|
||||
|
@ -54,6 +54,7 @@ class VideoDialog : public Dialog
|
|||
PopUpWidget* myFilterPopup;
|
||||
PopUpWidget* myFSStretchPopup;
|
||||
PopUpWidget* myPalettePopup;
|
||||
PopUpWidget* myFSResPopup;
|
||||
SliderWidget* myUIZoomSlider;
|
||||
StaticTextWidget* myUIZoomLabel;
|
||||
SliderWidget* myTIAZoomSlider;
|
||||
|
|
Loading…
Reference in New Issue