Add tablets calibration matrix for dynamic rotation with 2-in1/tablet PC usage (#1319)
This commit is contained in:
parent
b5b436e01d
commit
040e99fd17
3 changed files with 37 additions and 22 deletions
|
|
@ -25,6 +25,26 @@ struct STouchData {
|
|||
Vector2D touchSurfaceOrigin;
|
||||
};
|
||||
|
||||
// The third row is always 0 0 1 and is not expected by `libinput_device_config_calibration_set_matrix`
|
||||
static const float MATRICES[8][6] = {
|
||||
{// normal
|
||||
1, 0, 0, 0, 1, 0},
|
||||
{// rotation 90°
|
||||
0, -1, 1, 1, 0, 0},
|
||||
{// rotation 180°
|
||||
-1, 0, 1, 0, -1, 1},
|
||||
{// rotation 270°
|
||||
0, 1, 0, -1, 0, 1},
|
||||
{// flipped
|
||||
-1, 0, 1, 0, 1, 0},
|
||||
{// flipped + rotation 90°
|
||||
0, 1, 0, 1, 0, 0},
|
||||
{// flipped + rotation 180°
|
||||
1, 0, 0, 0, -1, 1},
|
||||
{// flipped + rotation 270°
|
||||
0, -1, 1, -1, 0, 1}
|
||||
};
|
||||
|
||||
class CKeybindManager;
|
||||
|
||||
class CInputManager {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue