Changeset View
Changeset View
Standalone View
Standalone View
source/ps/KeyName.cpp
Show All 19 Lines | |||||
#include "precompiled.h" | #include "precompiled.h" | ||||
#include "KeyName.h" | #include "KeyName.h" | ||||
#include "lib/external_libraries/libsdl.h" | #include "lib/external_libraries/libsdl.h" | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include <unordered_map> | #include <unordered_map> | ||||
#include <vector> | |||||
// Some scancodes <-> names that SDL doesn't recognise. | // Some scancodes <-> names that SDL doesn't recognise. | ||||
// Those are tested first so they override SDL defaults (useful for UNIFIED keys). | // Those are tested first so they override SDL defaults (useful for UNIFIED keys). | ||||
static const std::unordered_map<int, std::vector<CStr>> scancodemap {{ | static const std::unordered_map<int, std::vector<CStr>> scancodemap {{ | ||||
{ SDL_SCANCODE_DOWN, { "DownArrow" } }, | { SDL_SCANCODE_DOWN, { "DownArrow" } }, | ||||
{ SDL_SCANCODE_UP, { "UpArrow" } }, | { SDL_SCANCODE_UP, { "UpArrow" } }, | ||||
{ SDL_SCANCODE_LEFT, { "LeftArrow" } }, | { SDL_SCANCODE_LEFT, { "LeftArrow" } }, | ||||
{ SDL_SCANCODE_RIGHT, { "RightArrow" } }, | { SDL_SCANCODE_RIGHT, { "RightArrow" } }, | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator