Kernel: Add support for DualShock 3 controllers
This driver accepts any HID joystick devices but button and axis mappings will only work on a PS3 controller
This commit is contained in:
28
userspace/libraries/LibInput/include/LibInput/Joystick.h
Normal file
28
userspace/libraries/LibInput/include/LibInput/Joystick.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace LibInput
|
||||
{
|
||||
|
||||
// TODO: not used but here if we ever make controller
|
||||
// support generating events instead of being polled
|
||||
struct JoystickEvent
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
struct JoystickState
|
||||
{
|
||||
struct Axis
|
||||
{
|
||||
int64_t value;
|
||||
int64_t min;
|
||||
int64_t max;
|
||||
};
|
||||
|
||||
Axis axis[4];
|
||||
bool buttons[32];
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user