From c043b557adc3a48072aff6c0a40a700b0fffe13a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 28 Jun 2015 18:46:50 -0700 Subject: [PATCH] Slow down the marquee for longer names. Let's not make anyone on a small screen dizzy. --- UI/SavedataScreen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index 0f95dc40d5..6e3ba6d17b 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -241,7 +241,8 @@ void SavedataButton::Draw(UIContext &dc) { float tx = 150; if (availableWidth < tw) { - tx -= (1.0f + sin(time_now_d() * 1.5f)) * sineWidth; + float overageRatio = 1.5f * availableWidth * 1.0f / tw; + tx -= (1.0f + sin(time_now_d() * overageRatio)) * sineWidth; Bounds tb = bounds_; tb.x = bounds_.x + 150; tb.w = bounds_.w - 150;