mirror of https://github.com/mgba-emu/mgba.git
GBA Core: Fix override loading from foreign configs
This commit is contained in:
parent
d481bd29fe
commit
98266d1b83
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue