GUI: fix warning

This commit is contained in:
tildearrow 2022-12-03 01:13:13 -05:00
parent 2a17c1040f
commit ae86cd420d

View file

@ -2923,7 +2923,7 @@ void FurnaceGUI::pointUp(int x, int y, int button) {
if (orderScrollLocked) { if (orderScrollLocked) {
int targetOrder=round(orderScroll); int targetOrder=round(orderScroll);
if (orderScrollTolerance) { if (orderScrollTolerance) {
targetOrder=round(orderScroll+(orderScrollRealOrigin.x-(canvasW/2))/(40.0f*dpiScale)); targetOrder=round(orderScroll+(orderScrollRealOrigin.x-((float)canvasW/2.0f))/(40.0f*dpiScale));
} }
if (targetOrder<0) targetOrder=0; if (targetOrder<0) targetOrder=0;
if (targetOrder>e->curSubSong->ordersLen-1) targetOrder=e->curSubSong->ordersLen-1; if (targetOrder>e->curSubSong->ordersLen-1) targetOrder=e->curSubSong->ordersLen-1;