GBA Core: Fix override loading from foreign configs

This commit is contained in:
Jeffrey Pfau 2016-02-08 20:43:48 -08:00
parent d481bd29fe
commit 98266d1b83
3 changed files with 7 additions and 2 deletions

View File

@ -388,6 +388,10 @@ struct Configuration* mCoreConfigGetOverrides(struct mCoreConfig* config) {
return &config->configTable;
}
const struct Configuration* mCoreConfigGetOverridesConst(const struct mCoreConfig* config) {
return &config->configTable;
}
void mCoreConfigFreeOpts(struct mCoreOptions* opts) {
free(opts->bios);
free(opts->shader);

View File

@ -88,6 +88,7 @@ void mCoreConfigLoadDefaults(struct mCoreConfig* config, const struct mCoreOptio
struct Configuration* mCoreConfigGetInput(struct mCoreConfig*);
struct Configuration* mCoreConfigGetOverrides(struct mCoreConfig*);
const struct Configuration* mCoreConfigGetOverridesConst(const struct mCoreConfig*);
void mCoreConfigFreeOpts(struct mCoreOptions* opts);

View File

@ -20,7 +20,7 @@ struct GBACore {
struct GBAVideoSoftwareRenderer renderer;
int keys;
struct mCPUComponent* components[GBA_COMPONENT_MAX];
struct Configuration* overrides;
const struct Configuration* overrides;
};
static bool _GBACoreInit(struct mCore* core) {
@ -74,7 +74,7 @@ static void _GBACoreLoadConfig(struct mCore* core, const struct mCoreConfig* con
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
struct GBACore* gbacore = (struct GBACore*) core;
gbacore->overrides = mCoreConfigGetOverrides(&core->config);
gbacore->overrides = mCoreConfigGetOverridesConst(config);
struct VFile* bios = 0;
if (core->opts.useBios) {