aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bacca2004-05-09 14:26:01 +0000
committerNicolas Bacca2004-05-09 14:26:01 +0000
commitab9598e2f56c62be37584e515d18296fe40730c7 (patch)
tree3e81c9fada6d491d25b3b581bc6ce123e83782e9
parent30cea15d24a4f7d2f4f97ec29fb0d6fb34217d51 (diff)
downloadscummvm-rg350-ab9598e2f56c62be37584e515d18296fe40730c7.tar.gz
scummvm-rg350-ab9598e2f56c62be37584e515d18296fe40730c7.tar.bz2
scummvm-rg350-ab9598e2f56c62be37584e515d18296fe40730c7.zip
Config sample switch for WinCE
svn-id: r13815
-rw-r--r--sound/fmopl.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp
index 0b3c1664a9..af2ce618c7 100644
--- a/sound/fmopl.cpp
+++ b/sound/fmopl.cpp
@@ -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 @@ FM_OPL *makeAdlibOPL(int rate) {
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);