diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index a1f8b79569..e300975449 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -103,16 +103,6 @@ void RageBitmapTexture::Reload( RageTexturePrefs prefs ) Create(); } - -static int power_of_two(int input) -{ - int value = 1; - - while ( value < input ) value <<= 1; - - return value; -} - /* * Each dwMaxSize, dwTextureColorDepth and iAlphaBits are maximums; we may * use less. iAlphaBits must be 0, 1 or 4. @@ -258,6 +248,7 @@ void RageBitmapTexture::Create() glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, fmtTexture, img->w, img->h, 0, GL_RGBA, GL_UNSIGNED_BYTE, img->pixels); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glFlush(); SDL_FreeSurface(img); diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index 108ed00121..906218a804 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -20,6 +20,15 @@ unsigned long randseed = time(NULL); #include #include +int power_of_two(int input) +{ + int value = 1; + + while ( value < input ) value <<= 1; + + return value; +} + bool IsAnInt( const char *s ) { if( s[0] == '\0' ) diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index 9cfae1d33f..7b1824757a 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -112,6 +112,7 @@ inline float froundf( const float f, const float fRoundInterval ) return int( (f + fRoundInterval/2)/fRoundInterval ) * fRoundInterval; } +int power_of_two(int input); bool IsAnInt( const char *s ); float TimeToSeconds( CString sHMS ); CString SecondsToTime( float fSecs );