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.
23 lines
522 B
23 lines
522 B
|
6 years ago
|
#pragma once
|
||
|
|
|
||
|
5 years ago
|
#include <SDL.h>
|
||
|
|
|
||
|
5 years ago
|
#include "controller_buttons.h"
|
||
|
6 years ago
|
|
||
|
5 years ago
|
namespace devilution {
|
||
|
6 years ago
|
|
||
|
|
struct ControllerButtonEvent {
|
||
|
|
ControllerButton button;
|
||
|
|
bool up;
|
||
|
|
};
|
||
|
|
|
||
|
5 years ago
|
// NOTE: Not idempotent because of how it handles axis triggers.
|
||
|
|
// Must be called exactly once per SDL input event.
|
||
|
6 years ago
|
ControllerButtonEvent ToControllerButtonEvent(const SDL_Event &event);
|
||
|
|
|
||
|
|
bool IsControllerButtonPressed(ControllerButton button);
|
||
|
|
|
||
|
5 years ago
|
bool HandleControllerAddedOrRemovedEvent(const SDL_Event &event);
|
||
|
6 years ago
|
|
||
|
5 years ago
|
} // namespace devilution
|