Correct comment, rename array

This commit is contained in:
Henrik Rydgård committed 2025-08-28 10:24:30 +02:00
1 parent 76fb535bec
commit e4a14330e0
4 files changed
+21 -20

No files matched your search

+7 -7
View File
@@ -133,7 +133,7 @@ void CustomButtonMappingScreen::CreateViews() {
memset(array, 0, sizeof(array));
cfg = &g_Config.CustomButton[id_];
show = &g_Config.touchCustom[id_].show;
for (int i = 0; i < ARRAY_SIZE(customKeyList); i++)
for (int i = 0; i < ARRAY_SIZE(g_customKeyList); i++)
array[i] = (0x01 == ((g_Config.CustomButton[id_].key >> i) & 0x01));
leftColumn->Add(new ButtonPreview(g_Config.iTouchButtonStyle == 0 ? customKeyShapes[cfg->shape].i : customKeyShapes[cfg->shape].l,
@@ -183,7 +183,7 @@ void CustomButtonMappingScreen::CreateViews() {
GridLayout *grid = vertLayout->Add(new GridLayout(gridsettings, new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
// Button image and action are defined in GamepadEmu.h
for (int i = 0; i < ARRAY_SIZE(customKeyList); ++i) {
for (int i = 0; i < ARRAY_SIZE(g_customKeyList); ++i) {
LinearLayout *row = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
row->SetSpacing(0);
@@ -191,10 +191,10 @@ void CustomButtonMappingScreen::CreateViews() {
row->Add(checkbox);
Choice *choice;
if (customKeyList[i].i.isValid()) {
choice = new Choice(customKeyList[i].i, new LinearLayoutParams(1.0f));
if (g_customKeyList[i].i.isValid()) {
choice = new Choice(g_customKeyList[i].i, new LinearLayoutParams(1.0f));
} else {
choice = new Choice(mc->T(KeyMap::GetPspButtonNameCharPointer(customKeyList[i].c)), new LinearLayoutParams(1.0f));
choice = new Choice(mc->T(KeyMap::GetPspButtonNameCharPointer(g_customKeyList[i].c)), new LinearLayoutParams(1.0f));
}
ChoiceEventHandler *choiceEventHandler = new ChoiceEventHandler(checkbox);
@@ -207,9 +207,9 @@ void CustomButtonMappingScreen::CreateViews() {
}
}
static uint64_t arrayToInt(const bool ary[ARRAY_SIZE(CustomKeyData::customKeyList)]) {
static uint64_t arrayToInt(const bool ary[ARRAY_SIZE(CustomKeyData::g_customKeyList)]) {
uint64_t value = 0;
for (int i = ARRAY_SIZE(CustomKeyData::customKeyList)-1; i >= 0; i--) {
for (int i = ARRAY_SIZE(CustomKeyData::g_customKeyList)-1; i >= 0; i--) {
value |= ary[i] ? 1 : 0;
if (i > 0) {
value = value << 1;