diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 4496af8066..3ab7bbf4e0 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -644,6 +644,7 @@ void CreditsScreen::render() { "Coldbird", "Kyhel", "xebra", + "LunaMoo", "", cr->T("specialthanks", "Special thanks to:"), "Maxim for his amazing Atrac3+ decoder work", diff --git a/Windows/main.cpp b/Windows/main.cpp index 7107317bcd..4203eed02a 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -197,7 +197,7 @@ static int ScreenDPI() { HDC screenDC = GetDC(nullptr); int dotsPerInch = GetDeviceCaps(screenDC, LOGPIXELSY); ReleaseDC(nullptr, screenDC); - return dotsPerInch; + return dotsPerInch ? dotsPerInch : 96; } #endif #endif diff --git a/ext/freetype b/ext/freetype new file mode 160000 index 0000000000..3e79254ae7 --- /dev/null +++ b/ext/freetype @@ -0,0 +1 @@ +Subproject commit 3e79254ae73ba4e5f951967b42d38b0aa1460af8 diff --git a/ext/native/input/gesture_detector.cpp b/ext/native/input/gesture_detector.cpp index 4c181413ed..8be42dd2ac 100644 --- a/ext/native/input/gesture_detector.cpp +++ b/ext/native/input/gesture_detector.cpp @@ -10,6 +10,9 @@ const float estimatedInertiaDamping = 0.75f; TouchInput GestureDetector::Update(const TouchInput &touch, const Bounds &bounds) { + if (touch.id < 0 || touch.id >= MAX_PTRS) { + return touch; + } // Mouse / 1-finger-touch control. Pointer &p = pointers[touch.id]; if ((touch.flags & TOUCH_DOWN) && bounds.Contains(touch.x, touch.y)) { @@ -79,13 +82,13 @@ void GestureDetector::UpdateFrame() { } bool GestureDetector::IsGestureActive(Gesture gesture, int touchId) const { - if (touchId < 0) + if (touchId < 0 || touchId >= MAX_PTRS) return false; return (pointers[touchId].active & gesture) != 0; } bool GestureDetector::GetGestureInfo(Gesture gesture, int touchId, float info[4]) const { - if (touchId < 0) + if (touchId < 0 || touchId >= MAX_PTRS) return false; memset(info, 0, sizeof(float) * 4); if (!(pointers[touchId].active & gesture)) { diff --git a/ext/native/ui/view.h b/ext/native/ui/view.h index b2afb6fb72..aada63d9ff 100644 --- a/ext/native/ui/view.h +++ b/ext/native/ui/view.h @@ -438,8 +438,6 @@ protected: // Outputs of layout. X/Y are absolute screen coordinates, hierarchy is "gone" here. Bounds bounds_; - std::unique_ptr transform_; - private: bool *enabledPtr_; bool enabled_; diff --git a/ext/native/ui/viewgroup.cpp b/ext/native/ui/viewgroup.cpp index eb3a2bf575..50dabcead2 100644 --- a/ext/native/ui/viewgroup.cpp +++ b/ext/native/ui/viewgroup.cpp @@ -890,7 +890,7 @@ float ScrollView::ClampedScrollPos(float pos) { Gesture gesture = orientation_ == ORIENT_VERTICAL ? GESTURE_DRAG_VERTICAL : GESTURE_DRAG_HORIZONTAL; - if (scrollTouchId_ != -1 && gesture_.IsGestureActive(gesture, scrollTouchId_)) { + if (scrollTouchId_ >= 0 && gesture_.IsGestureActive(gesture, scrollTouchId_) && bounds_.h > 0) { float maxPull = bounds_.h * 0.1f; if (pos < 0.0f) { float dist = std::min(-pos * (1.0f / bounds_.h), 1.0f);