Fixing segfault caused by the previous commit for not initing the mInputMap
This commit is contained in:
parent
72677feab5
commit
52eb3e4266
@ -37,6 +37,8 @@ msCoreControllerLoadGame (const unsigned char *rom, size_t rom_len,
|
||||
goto loadGameReturn;
|
||||
}
|
||||
core->init(core);
|
||||
|
||||
mInputMapInit(&core->inputMap, &GBAInputInfo);
|
||||
mInputBindKey(&core->inputMap, 0, MSGBA_KEY_A, GBA_KEY_A);
|
||||
mInputBindKey(&core->inputMap, 0, MSGBA_KEY_B, GBA_KEY_B);
|
||||
mInputBindKey(&core->inputMap, 0, MSGBA_KEY_L, GBA_KEY_L);
|
||||
@ -104,6 +106,7 @@ msCoreControllerDestroy(struct msCoreController **controller_ptr) {
|
||||
mCoreThreadJoin(&controller->threadContext);
|
||||
if (controller->threadContext.core) {
|
||||
struct mCore *core = controller->threadContext.core;
|
||||
mInputMapDeinit(&core->inputMap);
|
||||
core->deinit(core);
|
||||
}
|
||||
free(controller->outputBuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user