PSP2: Explicitly zero-initialize structs used in touch controls

This commit is contained in:
rsn8887 2020-04-15 13:43:15 -05:00
parent bff75784a6
commit 6fa431a5fc

View File

@ -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]; // keep track of finger status
Touch _finger[SCE_TOUCH_PORT_MAX_NUM][MAX_NUM_FINGERS] = {0}; // 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]; // keep track whether we are currently drag-and-dropping
DraggingType _multiFingerDragging[SCE_TOUCH_PORT_MAX_NUM] = {0}; // keep track whether we are currently drag-and-dropping
unsigned int _simulatedClickStartTime[SCE_TOUCH_PORT_MAX_NUM][2]; // initiation time of last simulated left or right click (zero if no click)
unsigned int _simulatedClickStartTime[SCE_TOUCH_PORT_MAX_NUM][2] = {0}; // 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;