cleanup
This commit is contained in:
@@ -550,20 +550,19 @@ RageSurface *RageDisplay::CreateSurfaceFromPixfmt( PixelFormat pixfmt,
|
|||||||
return surf;
|
return surf;
|
||||||
}
|
}
|
||||||
|
|
||||||
PixelFormat RageDisplay::FindPixelFormat(
|
PixelFormat RageDisplay::FindPixelFormat( int iBPP, int iRmask, int iGmask, int iBmask, int iAmask, bool bRealtime )
|
||||||
int bpp, int Rmask, int Gmask, int Bmask, int Amask, bool realtime )
|
|
||||||
{
|
{
|
||||||
PixelFormatDesc tmp = { bpp, { Rmask, Gmask, Bmask, Amask } };
|
PixelFormatDesc tmp = { iBPP, { iRmask, iGmask, iBmask, iAmask } };
|
||||||
|
|
||||||
for(int pixfmt = 0; pixfmt < NUM_PixelFormat; ++pixfmt)
|
FOREACH_ENUM2( PixelFormat, iPixFmt )
|
||||||
{
|
{
|
||||||
const PixelFormatDesc *pf = GetPixelFormatDesc(PixelFormat(pixfmt));
|
const PixelFormatDesc *pf = GetPixelFormatDesc( PixelFormat(iPixFmt) );
|
||||||
if(!SupportsTextureFormat( PixelFormat(pixfmt), realtime ))
|
if( !SupportsTextureFormat(PixelFormat(iPixFmt), bRealtime) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( memcmp(pf, &tmp, sizeof(tmp)) )
|
if( memcmp(pf, &tmp, sizeof(tmp)) )
|
||||||
continue;
|
continue;
|
||||||
return PixelFormat(pixfmt);
|
return iPixFmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
return PixelFormat_INVALID;
|
return PixelFormat_INVALID;
|
||||||
|
|||||||
Reference in New Issue
Block a user