mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Remove unused drag capture state tracking.
This commit is contained in:
1 parent
9e390510df
commit
e1ef359e80
2 files changed
+2
-22
No files matched your search
@@ -21,22 +21,6 @@ static std::mutex focusLock;
|
||||
static std::vector<int> focusMoves;
|
||||
extern bool focusForced;
|
||||
|
||||
// TODO: Seems like this drag stuff is no longer used.
|
||||
#define MAX_POINTERS 10
|
||||
bool dragCaptured[MAX_POINTERS];
|
||||
|
||||
void CaptureDrag(int id) {
|
||||
dragCaptured[id] = true;
|
||||
}
|
||||
|
||||
void ReleaseDrag(int id) {
|
||||
dragCaptured[id] = false;
|
||||
}
|
||||
|
||||
bool IsDragCaptured(int id) {
|
||||
return dragCaptured[id];
|
||||
}
|
||||
|
||||
void ApplyGravity(const Bounds outer, const Margins &margins, float w, float h, int gravity, Bounds &inner) {
|
||||
inner.w = w;
|
||||
inner.h = h;
|
||||
@@ -753,13 +737,13 @@ void ScrollView::Touch(const TouchInput &input) {
|
||||
|
||||
if (input.flags & TOUCH_UP) {
|
||||
float info[4];
|
||||
if (!IsDragCaptured(input.id) && gesture_.GetGestureInfo(gesture, info)) {
|
||||
if (gesture_.GetGestureInfo(gesture, info)) {
|
||||
inertia_ = info[1];
|
||||
}
|
||||
}
|
||||
|
||||
TouchInput input2;
|
||||
if (CanScroll() && !IsDragCaptured(input.id)) {
|
||||
if (CanScroll()) {
|
||||
input2 = gesture_.Update(input, bounds_);
|
||||
float info[4];
|
||||
if (gesture_.GetGestureInfo(gesture, info) && !(input.flags & TOUCH_DOWN)) {
|
||||
|
||||
@@ -414,8 +414,4 @@ bool KeyEvent(const KeyInput &key, ViewGroup *root);
|
||||
bool TouchEvent(const TouchInput &touch, ViewGroup *root);
|
||||
bool AxisEvent(const AxisInput &axis, ViewGroup *root);
|
||||
|
||||
void CaptureDrag(int id);
|
||||
void ReleaseDrag(int id);
|
||||
bool IsDragCaptured(int id);
|
||||
|
||||
} // namespace UI
|
||||
Reference in new issue
Block a user