[Scummvm-cvs-logs] CVS: scummvm/sound fmopl.cpp,1.22,1.23
Nicolas Bacca
arisme at users.sourceforge.net
Sun May 9 07:27:01 CEST 2004
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22696
Modified Files:
fmopl.cpp
Log Message:
Config sample switch for WinCE
Index: fmopl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/fmopl.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- fmopl.cpp 13 Mar 2004 18:44:09 -0000 1.22
+++ fmopl.cpp 9 May 2004 14:26:01 -0000 1.23
@@ -34,6 +34,10 @@
#include "common/util.h"
+#ifdef _WIN32_WCE
+#include "common/config-manager.h"
+#endif
+
/* -------------------- preliminary define section --------------------- */
/* attack/decay rate time rate */
#define OPL_ARRATE 141280 /* RATE 4 = 2826.24ms @ 3.6MHz */
@@ -1124,20 +1128,14 @@
int env_bits = FMOPL_ENV_BITS_HQ;
int eg_ent = FMOPL_EG_ENT_HQ;
#ifdef _WIN32_WCE
- // TODO: On WinCE, use low quality FMOPL by default.
- // FIXME: Don't use 'CE_' or similar prefixes if you need platform specific
- // config keys. Rather use a seperate config domain - e.g. for WinCE we have
- // two such domains already, "wince" and "smartfon-keys" (although I wonder
- // a bit about the latter one).
- if (ConfMan.getBool("CE_FM_high_quality"))
+ if (ConfMan.hasKey("FM_high_quality") && ConfMan.getBool("FM_high_quality")) {
env_bits = FMOPL_ENV_BITS_HQ;
- else
- env_bits = FMOPL_ENV_BITS_LQ;
-
- if (ConfMan.getBool("CE_FM_high_quality"))
eg_ent = FMOPL_EG_ENT_HQ;
- else
+ }
+ else {
+ env_bits = FMOPL_ENV_BITS_LQ;
eg_ent = FMOPL_EG_ENT_LQ;
+ }
#endif
OPLBuildTables(env_bits, eg_ent);
return OPLCreate(OPL_TYPE_YM3812, 3579545, rate);
More information about the Scummvm-git-logs
mailing list