Button remapping uses number 1..5
moved mapping code to CheckOptions()
This commit is contained in:
parent
a54f1804ba
commit
eac4475c4f
2 changed files with 21 additions and 13 deletions
11
options.txt
11
options.txt
|
@ -91,8 +91,9 @@ GraphIEC = 1
|
||||||
//IgnoreReset = 0
|
//IgnoreReset = 0
|
||||||
|
|
||||||
// You can remap the physical button functions
|
// You can remap the physical button functions
|
||||||
//buttonEnter = 0
|
// numbers correspond to the standard board layout
|
||||||
//buttonUp = 1
|
//buttonEnter = 1
|
||||||
//buttonDown = 2
|
//buttonUp = 2
|
||||||
//buttonBack = 3
|
//buttonDown = 3
|
||||||
//buttonInsert = 4
|
//buttonBack = 4
|
||||||
|
//buttonInsert = 5
|
||||||
|
|
23
src/main.cpp
23
src/main.cpp
|
@ -1289,6 +1289,20 @@ static void CheckOptions()
|
||||||
}
|
}
|
||||||
while (1);
|
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"
|
extern "C"
|
||||||
|
@ -1348,16 +1362,9 @@ extern "C"
|
||||||
// DEBUG_LOG("Mouse found\r\n");
|
// DEBUG_LOG("Mouse found\r\n");
|
||||||
|
|
||||||
Keyboard::Instance();
|
Keyboard::Instance();
|
||||||
// InputMappings::Instance();
|
InputMappings::Instance();
|
||||||
InputMappings* inputMappings = InputMappings::Instance();
|
|
||||||
//USPiMouseRegisterStatusHandler(MouseHandler);
|
//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();
|
CheckOptions();
|
||||||
|
|
||||||
IEC_Bus::SetSplitIECLines(options.SplitIECLines());
|
IEC_Bus::SetSplitIECLines(options.SplitIECLines());
|
||||||
|
|
Loading…
Reference in a new issue