Config sample switch for WinCE

svn-id: r13815
This commit is contained in:
Nicolas Bacca 2004-05-09 14:26:01 +00:00
parent 30cea15d24
commit ab9598e2f5

View File

@ -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);