Ports: Ability to enable or disable all SGB features (closes #1205)

This commit is contained in:
Vicki Pfau 2019-06-05 12:55:30 -07:00
parent c5fc0f0492
commit e34c529f7e
2 changed files with 15 additions and 2 deletions

View File

@ -13,6 +13,7 @@ Features:
- Interframe blending for games that use flicker effects
- Frame inspector for dissecting and debugging rendering
- Switch: Option to use built-in brightness sensor for Boktai
- Ports: Ability to enable or disable all SGB features (closes mgba.io/i/1205)
Emulation fixes:
- GBA: All IRQs have 7 cycle delay (fixes mgba.io/i/539, mgba.io/i/1208)
- GBA: Reset now reloads multiboot ROMs

View File

@ -118,6 +118,20 @@ void mGUIShowConfig(struct mGUIRunner* runner, struct GUIMenuItem* extra, size_t
},
.nStates = 2
};
*GUIMenuItemListAppend(&menu.items) = (struct GUIMenuItem) {
.title = "Enable SGB features",
.data = "sgb.model",
.submenu = 0,
.state = true,
.validStates = (const char*[]) {
"Off", "On"
},
.stateMappings = (const struct GUIVariant[]) {
GUI_V_S("DMG"),
GUI_V_S("SGB"),
},
.nStates = 2
};
*GUIMenuItemListAppend(&menu.items) = (struct GUIMenuItem) {
.title = "Enable SGB borders",
.data = "sgb.borders",
@ -173,8 +187,6 @@ void mGUIShowConfig(struct mGUIRunner* runner, struct GUIMenuItem* extra, size_t
continue;
}
if (item->stateMappings) {
item->state = 0;
size_t j;
for (j = 0; j < item->nStates; ++j) {
const struct GUIVariant* v = &item->stateMappings[j];