diff --git a/examples/common/entry/entry.h b/examples/common/entry/entry.h index c5818c5cb..b9c272ff8 100644 --- a/examples/common/entry/entry.h +++ b/examples/common/entry/entry.h @@ -164,6 +164,7 @@ namespace entry GamepadRight, GamepadBack, GamepadStart, + GamepadGuide, Count }; diff --git a/examples/common/entry/entry_sdl.cpp b/examples/common/entry/entry_sdl.cpp index b7f432b3e..b57c8ed7c 100644 --- a/examples/common/entry/entry_sdl.cpp +++ b/examples/common/entry/entry_sdl.cpp @@ -303,6 +303,7 @@ namespace entry initTranslateGamepad(SDL_CONTROLLER_BUTTON_DPAD_RIGHT, Key::GamepadRight); initTranslateGamepad(SDL_CONTROLLER_BUTTON_BACK, Key::GamepadBack); initTranslateGamepad(SDL_CONTROLLER_BUTTON_START, Key::GamepadStart); + initTranslateGamepad(SDL_CONTROLLER_BUTTON_GUIDE, Key::GamepadGuide); memset(s_translateGamepadAxis, uint8_t(GamepadAxis::Count), sizeof(s_translateGamepadAxis) ); initTranslateGamepadAxis(SDL_CONTROLLER_AXIS_LEFTX, GamepadAxis::LeftX); diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index 66189681d..aa3b19dc1 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -19,6 +19,10 @@ #include #include +#ifndef XINPUT_GAMEPAD_GUIDE +# define XINPUT_GAMEPAD_GUIDE 0x400 +#endif // XINPUT_GAMEPAD_GUIDE + namespace entry { typedef DWORD (WINAPI* PFN_XINPUT_GET_STATE)(DWORD dwUserIndex, XINPUT_STATE* pState); @@ -45,6 +49,7 @@ namespace entry { XINPUT_GAMEPAD_RIGHT_THUMB, Key::GamepadThumbR }, { XINPUT_GAMEPAD_LEFT_SHOULDER, Key::GamepadShoulderL }, { XINPUT_GAMEPAD_RIGHT_SHOULDER, Key::GamepadShoulderR }, + { XINPUT_GAMEPAD_GUIDE, Key::GamepadGuide }, { XINPUT_GAMEPAD_A, Key::GamepadA }, { XINPUT_GAMEPAD_B, Key::GamepadB }, { XINPUT_GAMEPAD_X, Key::GamepadX },