You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
590 B
30 lines
590 B
#pragma once |
|
|
|
// Keyboard keys acting like gamepad buttons |
|
#ifndef HAS_KBCTRL |
|
#define HAS_KBCTRL 0 |
|
#endif |
|
|
|
#if HAS_KBCTRL == 1 |
|
#ifdef USE_SDL3 |
|
#include <SDL3/SDL_events.h> |
|
#else |
|
#include <SDL.h> |
|
|
|
#ifdef USE_SDL1 |
|
#include "utils/sdl2_to_1_2_backports.h" |
|
#endif |
|
#endif |
|
|
|
#include "controls/controller_buttons.h" |
|
|
|
namespace devilution { |
|
|
|
ControllerButton KbCtrlToControllerButton(const SDL_Event &event); |
|
|
|
SDL_Keycode ControllerButtonToKbCtrlKeyCode(ControllerButton button); |
|
|
|
bool IsKbCtrlButtonPressed(ControllerButton button); |
|
|
|
} // namespace devilution |
|
#endif
|
|
|