Skip to content

Commit

Permalink
SDL: Remove needless typedef's
Browse files Browse the repository at this point in the history
  • Loading branch information
phcoder committed Sep 28, 2024
1 parent 93e5aff commit fc5506a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backends/events/sdl/sdl-events.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,29 +230,29 @@ class SdlEventSource : public Common::EventSource {
FINGER_SUBPIXEL_MULTIPLIER = 16 // multiplier for sub-pixel resolution
};

typedef struct TouchFinger {
struct TouchFinger {
int id = -1; // -1: no touch
uint32 timeLastDown = 0;
int lastX = 0; // last known screen coordinates
int lastY = 0; // last known screen coordinates
float lastDownX = 0; // SDL touch coordinates when last pressed down
float lastDownY = 0; // SDL touch coordinates when last pressed down
} TouchFinger;
};

typedef enum DraggingType {
enum DraggingType {
DRAG_NONE = 0,
DRAG_TWO_FINGER,
DRAG_THREE_FINGER,
} DraggingType;
};

typedef struct TouchPanelState {
struct TouchPanelState {
TouchFinger _finger[MAX_NUM_FINGERS]; // keep track of finger status
DraggingType _multiFingerDragging = DRAG_NONE; // keep track whether we are currently drag-and-dropping
unsigned int _simulatedClickStartTime[2] = {0, 0}; // initiation time of last simulated left or right click (zero if no click)
int _hiresDX = 0; // keep track of slow, sub-pixel, finger motion across multiple frames
int _hiresDY = 0;
bool _tapMade = false;
} TouchPanelState;
};

Common::HashMap<unsigned long, TouchPanelState> _touchPanels;

Expand Down

0 comments on commit fc5506a

Please sign in to comment.