[Scummvm-cvs-logs] CVS: scummvm/common main.cpp,1.22,1.23 gameDetector.h,1.31,1.32 gameDetector.cpp,1.83,1.84
Jonathan Gray
khalek at users.sourceforge.net
Mon Mar 17 22:54:03 CET 2003
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv7533
Modified Files:
main.cpp gameDetector.h gameDetector.cpp
Log Message:
add GF_DEFAULT_TO_1X_SCALER
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/main.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- main.cpp 7 Mar 2003 00:52:45 -0000 1.22
+++ main.cpp 18 Mar 2003 06:53:14 -0000 1.23
@@ -197,6 +197,13 @@
prop.caption = detector.getGameName().c_str();
system->property(OSystem::PROP_SET_WINDOW_CAPTION, &prop);
+ // See if the game should default to 1x scaler
+ if ((detector._default_gfx_mode) &&
+ (detector._features & GF_DEFAULT_TO_1X_SCALER)) {
+ prop.gfx_mode = GFX_NORMAL;
+ system->property(OSystem::PROP_SET_GFX_MODE, &prop);
+ }
+
// Create the game engine
Engine *engine = Engine::createFromDetector(&detector, system);
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- gameDetector.h 6 Mar 2003 21:45:22 -0000 1.31
+++ gameDetector.h 18 Mar 2003 06:53:14 -0000 1.32
@@ -68,6 +68,7 @@
GF_AMIGA = 1 << 14,
GF_HUMONGOUS = 1 << 15,
GF_NEW_COSTUMES = 1 << 16,
+ GF_DEFAULT_TO_1X_SCALER = 1 << 17,
GF_HAS_ROOMTABLE = GF_AFTER_V7,
GF_USE_ANGLES = GF_AFTER_V7,
@@ -147,6 +148,7 @@
int _gfx_driver;
int _gfx_mode;
+ bool _default_gfx_mode;
int _cdrom;
int _save_slot;
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- gameDetector.cpp 6 Mar 2003 21:45:20 -0000 1.83
+++ gameDetector.cpp 18 Mar 2003 06:53:14 -0000 1.84
@@ -158,6 +158,7 @@
#else
_gfx_mode = GFX_NORMAL;
#endif
+ _default_gfx_mode = true;
#if defined(USE_NULL_DRIVER)
_gfx_driver = GD_NULL;
@@ -467,8 +468,10 @@
int GameDetector::parseGraphicsMode(const char *s) {
const GraphicsModes *gm = gfx_modes;
while(gm->name) {
- if (!scumm_stricmp(gm->name, s))
+ if (!scumm_stricmp(gm->name, s)) {
+ _default_gfx_mode = false;
return gm->id;
+ }
gm++;
}
More information about the Scummvm-git-logs
mailing list