mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
PSP2/SWITCH: Touch structs initialization in constructor to fix build
This commit is contained in:
parent
6fa431a5fc
commit
8382ecdeae
@ -44,6 +44,11 @@ PSP2EventSource::PSP2EventSource() {
|
||||
for (int port = 0; port < SCE_TOUCH_PORT_MAX_NUM; port++) {
|
||||
for (int i = 0; i < MAX_NUM_FINGERS; i++) {
|
||||
_finger[port][i].id = -1;
|
||||
_finger[port][i].timeLastDown = 0;
|
||||
_finger[port][i].lastX = 0;
|
||||
_finger[port][i].lastY = 0;
|
||||
_finger[port][i].lastDownX = 0;
|
||||
_finger[port][i].lastDownY = 0;
|
||||
}
|
||||
_multiFingerDragging[port] = DRAG_NONE;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ private:
|
||||
float lastDownY; // SDL touch coordinates when last pressed down
|
||||
} Touch;
|
||||
|
||||
Touch _finger[SCE_TOUCH_PORT_MAX_NUM][MAX_NUM_FINGERS] = {0}; // keep track of finger status
|
||||
Touch _finger[SCE_TOUCH_PORT_MAX_NUM][MAX_NUM_FINGERS]; // keep track of finger status
|
||||
|
||||
typedef enum DraggingType {
|
||||
DRAG_NONE = 0,
|
||||
@ -62,9 +62,9 @@ private:
|
||||
DRAG_THREE_FINGER,
|
||||
} DraggingType;
|
||||
|
||||
DraggingType _multiFingerDragging[SCE_TOUCH_PORT_MAX_NUM] = {0}; // keep track whether we are currently drag-and-dropping
|
||||
DraggingType _multiFingerDragging[SCE_TOUCH_PORT_MAX_NUM]; // keep track whether we are currently drag-and-dropping
|
||||
|
||||
unsigned int _simulatedClickStartTime[SCE_TOUCH_PORT_MAX_NUM][2] = {0}; // initiation time of last simulated left or right click (zero if no click)
|
||||
unsigned int _simulatedClickStartTime[SCE_TOUCH_PORT_MAX_NUM][2]; // initiation time of last simulated left or right click (zero if no click)
|
||||
|
||||
int _hiresDX; // keep track of slow, sub-pixel, finger motion across multiple frames
|
||||
int _hiresDY;
|
||||
|
@ -40,6 +40,11 @@ SwitchEventSource::SwitchEventSource() {
|
||||
for (int port = 0; port < SCE_TOUCH_PORT_MAX_NUM; port++) {
|
||||
for (int i = 0; i < MAX_NUM_FINGERS; i++) {
|
||||
_finger[port][i].id = -1;
|
||||
_finger[port][i].timeLastDown = 0;
|
||||
_finger[port][i].lastX = 0;
|
||||
_finger[port][i].lastY = 0;
|
||||
_finger[port][i].lastDownX = 0;
|
||||
_finger[port][i].lastDownY = 0;
|
||||
}
|
||||
_multiFingerDragging[port] = DRAG_NONE;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ private:
|
||||
float lastDownY; // SDL touch coordinates when last pressed down
|
||||
} Touch;
|
||||
|
||||
Touch _finger[SCE_TOUCH_PORT_MAX_NUM][MAX_NUM_FINGERS] = {0}; // keep track of finger status
|
||||
Touch _finger[SCE_TOUCH_PORT_MAX_NUM][MAX_NUM_FINGERS]; // keep track of finger status
|
||||
|
||||
typedef enum DraggingType {
|
||||
DRAG_NONE = 0,
|
||||
@ -65,9 +65,9 @@ private:
|
||||
DRAG_THREE_FINGER,
|
||||
} DraggingType;
|
||||
|
||||
DraggingType _multiFingerDragging[SCE_TOUCH_PORT_MAX_NUM] = {0}; // keep track whether we are currently drag-and-dropping
|
||||
DraggingType _multiFingerDragging[SCE_TOUCH_PORT_MAX_NUM]; // keep track whether we are currently drag-and-dropping
|
||||
|
||||
unsigned int _simulatedClickStartTime[SCE_TOUCH_PORT_MAX_NUM][2] = {0}; // initiation time of last simulated left or right click (zero if no click)
|
||||
unsigned int _simulatedClickStartTime[SCE_TOUCH_PORT_MAX_NUM][2]; // initiation time of last simulated left or right click (zero if no click)
|
||||
|
||||
void preprocessFingerDown(SDL_Event *event);
|
||||
void preprocessFingerUp(SDL_Event *event);
|
||||
|
Loading…
Reference in New Issue
Block a user