@@ -192,7 +192,7 @@ struct WindowContext {
192
192
sf::Vector2i touchPos;
193
193
194
194
unsigned int joystickId;
195
- ImGuiKey_ joystickMapping[sf::Joystick::ButtonCount];
195
+ ImGuiKey joystickMapping[sf::Joystick::ButtonCount];
196
196
StickInfo dPadInfo;
197
197
StickInfo lStickInfo;
198
198
StickInfo rStickInfo;
@@ -848,7 +848,7 @@ void SetJoystickMapping(int key, unsigned int joystickButton) {
848
848
assert (s_currWindowCtx);
849
849
// This function now expects ImGuiKey_* values.
850
850
// For partial backwards compatibility, also expect some ImGuiNavInput_* values.
851
- ImGuiKey_ finalKey;
851
+ ImGuiKey finalKey;
852
852
switch (key) {
853
853
case ImGuiNavInput_Activate:
854
854
finalKey = ImGuiKey_GamepadFaceDown;
@@ -872,7 +872,7 @@ void SetJoystickMapping(int key, unsigned int joystickButton) {
872
872
break ;
873
873
default :
874
874
assert (key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END);
875
- finalKey = static_cast <ImGuiKey_ >(key);
875
+ finalKey = static_cast <ImGuiKey >(key);
876
876
}
877
877
assert (joystickButton < sf::Joystick::ButtonCount);
878
878
s_currWindowCtx->joystickMapping [joystickButton] = finalKey;
@@ -1312,7 +1312,7 @@ void initDefaultJoystickMapping() {
1312
1312
1313
1313
void updateJoystickButtonState (ImGuiIO& io) {
1314
1314
for (int i = 0 ; i < sf::Joystick::ButtonCount; ++i) {
1315
- ImGuiKey_ key = s_currWindowCtx->joystickMapping [i];
1315
+ ImGuiKey key = s_currWindowCtx->joystickMapping [i];
1316
1316
if (key != ImGuiKey_None) {
1317
1317
bool isPressed = sf::Joystick::isButtonPressed (s_currWindowCtx->joystickId , i);
1318
1318
if (s_currWindowCtx->windowHasFocus || !isPressed) {
@@ -1322,7 +1322,7 @@ void updateJoystickButtonState(ImGuiIO& io) {
1322
1322
}
1323
1323
}
1324
1324
1325
- void updateJoystickAxis (ImGuiIO& io, ImGuiKey_ key, sf::Joystick::Axis axis, float threshold,
1325
+ void updateJoystickAxis (ImGuiIO& io, ImGuiKey key, sf::Joystick::Axis axis, float threshold,
1326
1326
float maxThreshold, bool inverted) {
1327
1327
float pos = sf::Joystick::getAxisPosition (s_currWindowCtx->joystickId , axis);
1328
1328
if (inverted) {
@@ -1336,7 +1336,7 @@ void updateJoystickAxis(ImGuiIO& io, ImGuiKey_ key, sf::Joystick::Axis axis, flo
1336
1336
}
1337
1337
}
1338
1338
1339
- void updateJoystickAxisPair (ImGuiIO& io, ImGuiKey_ key1, ImGuiKey_ key2, sf::Joystick::Axis axis,
1339
+ void updateJoystickAxisPair (ImGuiIO& io, ImGuiKey key1, ImGuiKey key2, sf::Joystick::Axis axis,
1340
1340
float threshold, bool inverted) {
1341
1341
updateJoystickAxis (io, key1, axis, -threshold, -100 , inverted);
1342
1342
updateJoystickAxis (io, key2, axis, threshold, 100 , inverted);
0 commit comments