mirror of https://github.com/stella-emu/stella.git
A few minor API fixes, and a fix for the '-pedantic' argument in GCC.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1548 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
54b5b79414
commit
6ba918320a
|
@ -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: CheatCodeDialog.cxx,v 1.19 2008-06-19 19:15:44 stephena Exp $
|
// $Id: CheatCodeDialog.cxx,v 1.20 2008-08-04 20:12:23 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
|
||||||
|
@ -217,8 +217,8 @@ void CheatCodeDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
const string& code = myCheatInput->getResult(1);
|
const string& code = myCheatInput->getResult(1);
|
||||||
if(instance().cheat().isValidCode(code))
|
if(instance().cheat().isValidCode(code))
|
||||||
{
|
{
|
||||||
|
myCheatInput->close();
|
||||||
instance().cheat().add(name, code);
|
instance().cheat().add(name, code);
|
||||||
parent().removeDialog();
|
|
||||||
loadConfig(); // show changes onscreen
|
loadConfig(); // show changes onscreen
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -234,8 +234,8 @@ void CheatCodeDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
int idx = myCheatList->getSelected();
|
int idx = myCheatList->getSelected();
|
||||||
if(instance().cheat().isValidCode(code))
|
if(instance().cheat().isValidCode(code))
|
||||||
{
|
{
|
||||||
|
myCheatInput->close();
|
||||||
instance().cheat().add(name, code, enable, idx);
|
instance().cheat().add(name, code, enable, idx);
|
||||||
parent().removeDialog();
|
|
||||||
loadConfig(); // show changes onscreen
|
loadConfig(); // show changes onscreen
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -257,8 +257,8 @@ void CheatCodeDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
const string& code = myCheatInput->getResult(1);
|
const string& code = myCheatInput->getResult(1);
|
||||||
if(instance().cheat().isValidCode(code))
|
if(instance().cheat().isValidCode(code))
|
||||||
{
|
{
|
||||||
|
myCheatInput->close();
|
||||||
instance().cheat().addOneShot(name, code);
|
instance().cheat().addOneShot(name, code);
|
||||||
parent().removeDialog();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
myCheatInput->setTitle("Invalid code");
|
myCheatInput->setTitle("Invalid code");
|
||||||
|
|
|
@ -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: ContextMenu.cxx,v 1.5 2008-07-25 12:41:41 stephena Exp $
|
// $Id: ContextMenu.cxx,v 1.6 2008-08-04 20:12:23 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
|
||||||
|
@ -194,7 +194,7 @@ void ContextMenu::handleMouseDown(int x, int y, int button, int clickCount)
|
||||||
if(x >= _x && x <= _x+_w && y >= _y && y <= _y+_h)
|
if(x >= _x && x <= _x+_w && y >= _y && y <= _y+_h)
|
||||||
sendSelection();
|
sendSelection();
|
||||||
else
|
else
|
||||||
parent().removeDialog();
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ void ContextMenu::handleEvent(Event::Type e)
|
||||||
drawCurrentSelection(_entries.size()-1);
|
drawCurrentSelection(_entries.size()-1);
|
||||||
break;
|
break;
|
||||||
case Event::UICancel:
|
case Event::UICancel:
|
||||||
parent().removeDialog();
|
close();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -304,7 +304,7 @@ void ContextMenu::drawCurrentSelection(int item)
|
||||||
{
|
{
|
||||||
// Change selection
|
// Change selection
|
||||||
_currentItem = item;
|
_currentItem = item;
|
||||||
setDirty(); draw();
|
setDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ void ContextMenu::sendSelection()
|
||||||
// Make sure the dialog is removed before sending any commands,
|
// Make sure the dialog is removed before sending any commands,
|
||||||
// since one consequence of sending a command may be to add another
|
// since one consequence of sending a command may be to add another
|
||||||
// dialog/menu
|
// dialog/menu
|
||||||
parent().removeDialog();
|
close();
|
||||||
|
|
||||||
// Send any command associated with the selection
|
// Send any command associated with the selection
|
||||||
_selectedItem = _currentItem;
|
_selectedItem = _currentItem;
|
||||||
|
|
|
@ -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: YaccParser.hxx,v 1.9 2008-02-06 13:45:24 stephena Exp $
|
// $Id: YaccParser.hxx,v 1.10 2008-08-04 20:12:23 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
|
||||||
|
@ -32,7 +32,7 @@ namespace YaccParser {
|
||||||
int parse(const char *);
|
int parse(const char *);
|
||||||
Expression *getResult();
|
Expression *getResult();
|
||||||
const string& errorMessage();
|
const string& errorMessage();
|
||||||
};
|
}
|
||||||
|
|
||||||
//#ifdef __cplusplus
|
//#ifdef __cplusplus
|
||||||
//}
|
//}
|
||||||
|
|
Loading…
Reference in New Issue