change win32 lrintf to match other archs

This commit is contained in:
Chris Danford
2007-01-05 01:26:53 +00:00
parent 3db2a307eb
commit 87505ec245
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -876,13 +876,13 @@ RageSurface *RageSurfaceUtils::PalettizeToGrayscale( const RageSurface *src_surf
if( Ivalues == 1 )
ScaledI = 255; // if only one intensity value, always fullbright
else
ScaledI = clamp( lrintf(I * (255.0f / (Ivalues-1))), 0, 255 );
ScaledI = clamp( lrintf(I * (255.0f / (Ivalues-1))), 0L, 255L );
int ScaledA;
if( Avalues == 1 )
ScaledA = 255; // if only one alpha value, always opaque
else
ScaledA = clamp( lrintf(A * (255.0f / (Avalues-1))), 0, 255 );
ScaledA = clamp( lrintf(A * (255.0f / (Avalues-1))), 0L, 255L );
RageSurfaceColor c;
c.r = uint8_t(ScaledI);
+1 -1
View File
@@ -114,7 +114,7 @@ static inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
// MinGW provides us with this function already
#if !defined(__MINGW32__)
inline int lrintf( float f )
inline long int lrintf( float f )
{
int retval;