mirror of
https://github.com/SFML/SFML.git
synced 2025-02-23 14:56:02 +08:00
Use std::bitset
This commit is contained in:
parent
20d57becf4
commit
0c3a64f437
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
#include <SFML/System/EnumArray.hpp>
|
#include <SFML/System/EnumArray.hpp>
|
||||||
|
|
||||||
|
#include <bitset>
|
||||||
|
|
||||||
|
|
||||||
namespace sf::priv
|
namespace sf::priv
|
||||||
{
|
{
|
||||||
@ -55,7 +57,7 @@ struct JoystickState
|
|||||||
{
|
{
|
||||||
bool connected{}; //!< Is the joystick currently connected?
|
bool connected{}; //!< Is the joystick currently connected?
|
||||||
EnumArray<Joystick::Axis, float, Joystick::AxisCount> axes{}; //!< Position of each axis, in range [-100, 100]
|
EnumArray<Joystick::Axis, float, Joystick::AxisCount> axes{}; //!< Position of each axis, in range [-100, 100]
|
||||||
std::array<bool, Joystick::ButtonCount> buttons{}; //!< Status of each button (true = pressed)
|
std::bitset<Joystick::ButtonCount> buttons; //!< Status of each button (true = pressed)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sf::priv
|
} // namespace sf::priv
|
||||||
|
Loading…
x
Reference in New Issue
Block a user