mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-03 03:05:18 +02:00
Custom buttons: sanitize image/shape on the one screen that didn't
CustomButtonMappingScreen indexes customKeyImages[36] and customKeyShapes[11] with values read straight from the ini, and it's reachable from the main menu - so neither GamepadEmu nor TouchControlLayoutScreen, which both sanitize first, need have run. Those two had the same fixup copy-pasted; hoisted it into a Sanitize() next to the tables and called it from all three.
This commit is contained in:
@@ -138,6 +138,9 @@ void CustomButtonMappingScreen::CreateDialogViews(UI::ViewGroup *parent) {
|
||||
bool *show = nullptr;
|
||||
memset(array, 0, sizeof(array));
|
||||
cfg = &g_Config.CustomButton[id_];
|
||||
// This screen is reachable from the main menu, so neither GamepadEmu nor the layout screen
|
||||
// need have sanitized these yet - and everything below indexes the tables with them.
|
||||
CustomKeyData::Sanitize(*cfg);
|
||||
show = &touch.touchCustom[id_].show;
|
||||
for (int i = 0; i < ARRAY_SIZE(g_customKeyList); i++)
|
||||
array[i] = (0x01 == ((g_Config.CustomButton[id_].key >> i) & 0x01));
|
||||
|
||||
Reference in New Issue
Block a user