Qt: Fix GB colors overrides being broken for games with CGB overrides when set to none

This commit is contained in:
Vicki Pfau 2022-08-16 03:35:44 -07:00
parent 8f724d6a1f
commit feec147f07
1 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,9 @@
#include <QMenu>
#include <mgba/feature/commandline.h>
#ifdef M_CORE_GB
#include <mgba/internal/gb/overrides.h>
#endif
static const mOption s_frontendOptions[] = {
{ "ecard", true, '\0' },
@ -128,8 +131,10 @@ ConfigController::ConfigController(QObject* parent)
m_opts.interframeBlending = false;
mCoreConfigLoad(&m_config);
mCoreConfigLoadDefaults(&m_config, &m_opts);
#ifdef M_CORE_GB
mCoreConfigSetDefaultIntValue(&m_config, "sgb.borders", 1);
mCoreConfigSetDefaultIntValue(&m_config, "useCgbColors", 1);
mCoreConfigSetDefaultIntValue(&m_config, "gb.colors", GB_COLORS_CGB);
#endif
mCoreConfigMap(&m_config, &m_opts);
mSubParserGraphicsInit(&m_subparsers[0], &m_graphicsOpts);