mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-24 10:44:28 -05:00
27 lines
925 B
C++
27 lines
925 B
C++
#pragma once
|
|
#include <switch.h>
|
|
|
|
namespace input
|
|
{
|
|
/// @brief Initializes PadState and input.
|
|
void initialize();
|
|
|
|
/// @brief Updates the PadState.
|
|
void update();
|
|
|
|
/// @brief Returns if a button was pressed the current frame, but not the previous.
|
|
/// @param button Button to check.
|
|
/// @return True if button is pressed. False if it wasn't.
|
|
bool button_pressed(HidNpadButton button);
|
|
|
|
/// @brief Returns if the button was pressed or held the previous and current frame.
|
|
/// @param button Button to check.
|
|
/// @return True if button is held. False if it isn't.
|
|
bool button_held(HidNpadButton button);
|
|
|
|
/// @brief Returns if the button was pressed or held the previous frame, but not the current.
|
|
/// @param button Button to check.
|
|
/// @return True if the button was released. False if it wasn't.
|
|
bool button_released(HidNpadButton button);
|
|
} // namespace input
|