Successful save/load of advanced gamepad button to hotkey function bindings for Qt GUI.

This commit is contained in:
mjbudd77 2021-07-29 20:59:30 -04:00
parent 7affd34b2c
commit 9ea53e210e
1 changed files with 16 additions and 0 deletions

View File

@ -1271,7 +1271,9 @@ void GamePadConfDialog_t::delKeyBindingCallback(void)
//---------------------------------------------------- //----------------------------------------------------
void GamePadConfDialog_t::updatePeriodic(void) void GamePadConfDialog_t::updatePeriodic(void)
{ {
bool buttonEnable;
char jsFound[ MAX_JOYSTICKS ]; char jsFound[ MAX_JOYSTICKS ];
QTreeWidgetItem *item;
memset( jsFound, 0, sizeof(jsFound) ); memset( jsFound, 0, sizeof(jsFound) );
@ -1354,10 +1356,24 @@ void GamePadConfDialog_t::updatePeriodic(void)
efs_chkbox->setChecked(fourScore); efs_chkbox->setChecked(fourScore);
} }
gpView->setPort(portNum); gpView->setPort(portNum);
gpView->update(); gpView->update();
refreshKeyBindTree(); refreshKeyBindTree();
item = keyBindTree->currentItem();
if ( item == NULL )
{
buttonEnable = false;
}
else
{
buttonEnable = true;
}
editKeyBindBtn->setEnabled(buttonEnable);
delKeyBindBtn->setEnabled(buttonEnable);
} }
//---------------------------------------------------- //----------------------------------------------------