Fix compiler errors due to branch rebasing
This commit is contained in:
parent
00c10ad600
commit
e538240922
|
@ -43,14 +43,13 @@ bool InputImpl::isKeyPressed(Keyboard::Key key)
|
|||
return KeyboardImpl::isKeyPressed(key);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
bool InputImpl::isKeyPressed(Keyboard::Scancode code)
|
||||
{
|
||||
return KeyboardImpl::isKeyPressed(code);
|
||||
}
|
||||
|
||||
// Open a connection with the X server
|
||||
Display* display = OpenDisplay();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
Keyboard::Key InputImpl::localize(Keyboard::Scancode code)
|
||||
|
@ -58,8 +57,6 @@ Keyboard::Key InputImpl::localize(Keyboard::Scancode code)
|
|||
return KeyboardImpl::localize(code);
|
||||
}
|
||||
|
||||
// Close the connection with the X server
|
||||
CloseDisplay(display);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
Keyboard::Scancode InputImpl::unlocalize(Keyboard::Key key)
|
||||
|
|
|
@ -78,8 +78,8 @@ sf::Keyboard::Scancode translateKeyCode(Display* display, KeyCode keycode)
|
|||
case XK_KP_9: return sf::Keyboard::ScanNumpad9;
|
||||
case XK_KP_Separator: return sf::Keyboard::ScanDecimal;
|
||||
case XK_KP_Decimal: return sf::Keyboard::ScanDecimal;
|
||||
case XK_KP_Equal: return sf::Keyboard::ScanPadEquals;
|
||||
case XK_KP_Enter: return sf::Keyboard::ScanReturn;
|
||||
case XK_KP_Equal: return sf::Keyboard::ScanNumpadEquals;
|
||||
case XK_KP_Enter: return sf::Keyboard::ScanNumpadEnter;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
@ -155,8 +155,8 @@ sf::Keyboard::Scancode translateKeyCode(Display* display, KeyCode keycode)
|
|||
case XK_KP_Up: return sf::Keyboard::ScanNumpad8;
|
||||
case XK_KP_Page_Up: return sf::Keyboard::ScanNumpad9;
|
||||
case XK_KP_Delete: return sf::Keyboard::ScanDecimal;
|
||||
case XK_KP_Equal: return sf::Keyboard::ScanPadEquals;
|
||||
case XK_KP_Enter: return sf::Keyboard::ScanReturn;
|
||||
case XK_KP_Equal: return sf::Keyboard::ScanNumpadEquals;
|
||||
case XK_KP_Enter: return sf::Keyboard::ScanNumpadEnter;
|
||||
|
||||
// Last resort: Check for printable keys (should not happen if the XKB
|
||||
// extension is available). This will give a layout dependent mapping
|
||||
|
@ -209,7 +209,7 @@ sf::Keyboard::Scancode translateKeyCode(Display* display, KeyCode keycode)
|
|||
case XK_grave: return sf::Keyboard::ScanGraveAccent;
|
||||
case XK_comma: return sf::Keyboard::ScanComma;
|
||||
case XK_period: return sf::Keyboard::ScanPeriod;
|
||||
case XK_slash: return sf::Keyboard::ScanForwardSlash;
|
||||
case XK_slash: return sf::Keyboard::ScanSlash;
|
||||
case XK_less: return sf::Keyboard::ScanReverseSolidus;
|
||||
default: return sf::Keyboard::ScanUnknown;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ void initMapping()
|
|||
else if (strcmp(name, "AB07") == 0) sc = sf::Keyboard::ScanM;
|
||||
else if (strcmp(name, "AB08") == 0) sc = sf::Keyboard::ScanComma;
|
||||
else if (strcmp(name, "AB09") == 0) sc = sf::Keyboard::ScanPeriod;
|
||||
else if (strcmp(name, "AB10") == 0) sc = sf::Keyboard::ScanForwardSlash;
|
||||
else if (strcmp(name, "AB10") == 0) sc = sf::Keyboard::ScanSlash;
|
||||
else if (strcmp(name, "LSGT") == 0) sc = sf::Keyboard::ScanReverseSolidus;
|
||||
else sc = sf::Keyboard::ScanUnknown;
|
||||
|
||||
|
@ -445,7 +445,7 @@ String KeyboardImpl::getDescription(Keyboard::Scancode code)
|
|||
// but we want to return their description, not their behaviour
|
||||
if (code == Keyboard::ScanEscape ||
|
||||
code == Keyboard::ScanEnter ||
|
||||
code == Keyboard::ScanReturn ||
|
||||
code == Keyboard::ScanNumpadEnter ||
|
||||
code == Keyboard::ScanTab ||
|
||||
code == Keyboard::ScanDelete ||
|
||||
code == Keyboard::ScanBackspace ||
|
||||
|
@ -511,8 +511,8 @@ String KeyboardImpl::getDescription(Keyboard::Scancode code)
|
|||
case Keyboard::ScanMultiply: return "Multiply (Numpad)";
|
||||
case Keyboard::ScanMinus: return "Minux (Numpad)";
|
||||
case Keyboard::ScanPlus: return "Plus (Numpad)";
|
||||
case Keyboard::ScanPadEquals: return "Equals (Numpad)";
|
||||
case Keyboard::ScanReturn: return "Enter (Numpad)";
|
||||
case Keyboard::ScanNumpadEquals: return "Equals (Numpad)";
|
||||
case Keyboard::ScanNumpadEnter: return "Enter (Numpad)";
|
||||
case Keyboard::ScanDecimal: return "Decimal (Numpad)";
|
||||
|
||||
case Keyboard::ScanNumpad0: return "0 (Numpad)";
|
||||
|
|
Loading…
Reference in a new issue