head 1.3; access; symbols pkgsrc-2019Q2:1.2.0.36 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.2.0.34 pkgsrc-2019Q1-base:1.2 pkgsrc-2018Q4:1.2.0.32 pkgsrc-2018Q4-base:1.2 pkgsrc-2018Q3:1.2.0.30 pkgsrc-2018Q3-base:1.2 pkgsrc-2018Q2:1.2.0.28 pkgsrc-2018Q2-base:1.2 pkgsrc-2018Q1:1.2.0.26 pkgsrc-2018Q1-base:1.2 pkgsrc-2017Q4:1.2.0.24 pkgsrc-2017Q4-base:1.2 pkgsrc-2017Q3:1.2.0.22 pkgsrc-2017Q3-base:1.2 pkgsrc-2017Q2:1.2.0.18 pkgsrc-2017Q2-base:1.2 pkgsrc-2017Q1:1.2.0.16 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.14 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.12 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.10 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.8 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.6 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.2.0.4 pkgsrc-2015Q3-base:1.2 pkgsrc-2015Q2:1.2.0.2 pkgsrc-2015Q2-base:1.2 pkgsrc-2015Q1:1.1.0.10 pkgsrc-2015Q1-base:1.1 pkgsrc-2014Q4:1.1.0.8 pkgsrc-2014Q4-base:1.1 pkgsrc-2014Q3:1.1.0.6 pkgsrc-2014Q3-base:1.1 pkgsrc-2014Q2:1.1.0.4 pkgsrc-2014Q2-base:1.1 pkgsrc-2014Q1:1.1.0.2 pkgsrc-2014Q1-base:1.1; locks; strict; comment @// @; 1.3 date 2019.09.21.11.32.08; author nia; state dead; branches; next 1.2; commitid JpsV3CIcVOlW5SDB; 1.2 date 2015.06.25.06.01.01; author dholland; state Exp; branches; next 1.1; commitid 3DWsPYJYqsUE3Mqy; 1.1 date 2014.01.02.06.45.48; author dholland; state Exp; branches; next ; commitid o1E5GAkEMEyUCvjx; desc @@ 1.3 log @milkytracker: Update to 1.02.00 - Switch distfile source to github. - Switch to SDL2. - Install desktop file and icons. - This release fixes multiple potential memory corruption bugs in the various module importers. @ text @$NetBSD: patch-src_tracker_TrackerStartup.cpp,v 1.2 2015/06/25 06:01:01 dholland Exp $ Taking the absolute value of the difference of two values doesn't work if the difference is unsigned. Do something else semi-reasonable instead for the case when the clock goes backwards. --- src/tracker/TrackerStartUp.cpp.orig 2013-11-09 00:12:01.000000000 +0000 +++ src/tracker/TrackerStartUp.cpp @@@@ -119,14 +119,16 @@@@ void Tracker::showSplash() pp_int32 deltaT = 100; while (shade <= 256.0f) { - pp_int32 startTime = ::PPGetTickCount(); + pp_uint32 startTime = ::PPGetTickCount(); #if defined(__EXCLUDE_BIGLOGO__) || defined(__LOWRES__) screen->paintSplash(LogoSmall::rawData, LogoSmall::width, LogoSmall::height, LogoSmall::width*4, 4, (int)shade); #else screen->paintSplash(LogoBig::rawData, LogoBig::width, LogoBig::height, LogoBig::width*3, 3, (int)shade); #endif shade+=deltaT * (1.0f/6.25f); - deltaT = abs(::PPGetTickCount() - startTime); + pp_uint32 nowTime = ::PPGetTickCount(); + /* just in case the clock goes backwards */ + deltaT = nowTime > startTime ? nowTime - startTime : 0; if (!deltaT) deltaT++; } #if defined(__EXCLUDE_BIGLOGO__) || defined(__LOWRES__) @@@@ -150,14 +152,16 @@@@ void Tracker::hideSplash() pp_int32 deltaT = 100; while (shade >= 0.0f) { - pp_int32 startTime = ::PPGetTickCount(); + pp_uint32 startTime = ::PPGetTickCount(); #if defined(__EXCLUDE_BIGLOGO__) || defined(__LOWRES__) screen->paintSplash(LogoSmall::rawData, LogoSmall::width, LogoSmall::height, LogoSmall::width*4, 4, (int)shade); #else screen->paintSplash(LogoBig::rawData, LogoBig::width, LogoBig::height, LogoBig::width*3, 3, (int)shade); #endif shade-=deltaT * (1.0f/6.25f); - deltaT = abs(::PPGetTickCount() - startTime); + pp_uint32 nowTime = ::PPGetTickCount(); + /* just in case the clock goes backwards */ + deltaT = nowTime > startTime ? nowTime - startTime : 0; if (!deltaT) deltaT++; } screen->clear(); @ 1.2 log @Extend this patch to a second chunk of code with the same logic. Seen in the Solaris build. @ text @d1 1 a1 1 $NetBSD: patch-src_tracker_TrackerStartup.cpp,v 1.1 2014/01/02 06:45:48 dholland Exp $ @ 1.1 log @Taking the absolute value of the difference of two things doesn't work if the difference is unsigned. Do something else instead. (It is backup logic for the clock going backwards while fading out the splash screen, so it's not exactly critical.) Caught by the Solaris C++ compiler, which warns if you try to pass an unsigned value to abs(). PKGREVISION++. @ text @d1 1 a1 1 $NetBSD$ d7 1 a7 1 --- src/tracker/TrackerStartUp.cpp~ 2008-02-23 16:32:45.000000000 +0000 d9 20 a28 1 @@@@ -134,14 +134,16 @@@@ void Tracker::hideSplash() @