[Scummvm-cvs-logs] CVS: scummvm/gui options.cpp,1.49,1.50
Max Horn
fingolfin at users.sourceforge.net
Tue Feb 24 14:55:26 CET 2004
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12241/gui
Modified Files:
options.cpp
Log Message:
the OSystem changes we discussed on the ML (note: renaming of the existing OSystem API is not yet finished); porters will have to fix their ports to get them to compile again
Index: options.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- options.cpp 24 Feb 2004 21:56:16 -0000 1.49
+++ options.cpp 24 Feb 2004 22:39:38 -0000 1.50
@@ -77,15 +77,11 @@
_gfxPopUp->setEnabled(false);
if (ConfMan.hasKey("gfx_mode", _domain)) {
- const GraphicsMode *gm = g_gfx_modes;
+ const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
String gfxMode = ConfMan.get("gfx_mode", _domain);
int gfxCount = 1;
while (gm->name) {
- OSystem::Property prop;
- prop.gfx_mode = gm->id;
-
- if (g_system->property(OSystem::PROP_HAS_SCALER, &prop) != 0)
- gfxCount++;
+ gfxCount++;
if (scumm_stricmp(gm->name, gfxMode.c_str()) == 0)
_gfxPopUp->setSelected(gfxCount);
@@ -255,7 +251,7 @@
int OptionsDialog::addGraphicControls(GuiObject *boss, int yoffset) {
const int x = 10;
const int w = _w - 2 * 10;
- const GraphicsMode *gm = g_gfx_modes;
+ const OSystem::GraphicsMode *gm = g_system->getSupportedGraphicsModes();
// The GFX mode popup
_gfxPopUp = new PopUpWidget(boss, x-5, yoffset, w+5, kLineHeight, "Graphics mode: ", 100);
@@ -263,17 +259,10 @@
_gfxPopUp->appendEntry("<default>");
_gfxPopUp->appendEntry("");
- while (gm->name) {
- OSystem::Property prop;
- prop.gfx_mode = gm->id;
-
- if (g_system->property(OSystem::PROP_HAS_SCALER, &prop) != 0) {
- _gfxPopUp->appendEntry(gm->name, gm->id);
-
- }
-
- gm++;
- }
+ while (gm->name) {
+ _gfxPopUp->appendEntry(gm->name, gm->id);
+ gm++;
+ }
// Fullscreen checkbox
_fullscreenCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Fullscreen mode");
More information about the Scummvm-git-logs
mailing list