diff --git a/options.txt b/options.txt index 26fc4af..a6f44ef 100644 --- a/options.txt +++ b/options.txt @@ -91,8 +91,9 @@ GraphIEC = 1 //IgnoreReset = 0 // You can remap the physical button functions -//buttonEnter = 0 -//buttonUp = 1 -//buttonDown = 2 -//buttonBack = 3 -//buttonInsert = 4 +// numbers correspond to the standard board layout +//buttonEnter = 1 +//buttonUp = 2 +//buttonDown = 3 +//buttonBack = 4 +//buttonInsert = 5 diff --git a/src/main.cpp b/src/main.cpp index 66b2e89..17fe665 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1289,6 +1289,20 @@ static void CheckOptions() } while (1); } + + + InputMappings* inputMappings = InputMappings::Instance(); + if (options.GetButtonEnter() ) + inputMappings->INPUT_BUTTON_ENTER = options.GetButtonEnter()-1; + if (options.GetButtonUp() ) + inputMappings->INPUT_BUTTON_UP = options.GetButtonUp()-1; + if (options.GetButtonDown() ) + inputMappings->INPUT_BUTTON_DOWN = options.GetButtonDown()-1; + if (options.GetButtonBack() ) + inputMappings->INPUT_BUTTON_BACK = options.GetButtonBack()-1; + if (options.GetButtonInsert() ) + inputMappings->INPUT_BUTTON_INSERT = options.GetButtonInsert()-1; + } extern "C" @@ -1348,16 +1362,9 @@ extern "C" // DEBUG_LOG("Mouse found\r\n"); Keyboard::Instance(); -// InputMappings::Instance(); - InputMappings* inputMappings = InputMappings::Instance(); + InputMappings::Instance(); //USPiMouseRegisterStatusHandler(MouseHandler); - inputMappings->INPUT_BUTTON_ENTER = options.GetButtonEnter(); - inputMappings->INPUT_BUTTON_UP = options.GetButtonUp(); - inputMappings->INPUT_BUTTON_DOWN = options.GetButtonDown(); - inputMappings->INPUT_BUTTON_BACK = options.GetButtonBack(); - inputMappings->INPUT_BUTTON_INSERT = options.GetButtonInsert(); - CheckOptions(); IEC_Bus::SetSplitIECLines(options.SplitIECLines());