use SDL_LoadImage
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
#include "SDL_utils.h"
|
#include "SDL_utils.h"
|
||||||
#include "SDL_dither.h"
|
#include "SDL_dither.h"
|
||||||
#include "SDL_image.h"
|
|
||||||
#include "SDL_rotozoom.h"
|
#include "SDL_rotozoom.h"
|
||||||
#include "SDL_utils.h"
|
#include "SDL_utils.h"
|
||||||
#include "RageDisplay.h"
|
#include "RageDisplay.h"
|
||||||
@@ -305,7 +304,7 @@ void BannerCache::CacheBanner( CString BannerPath )
|
|||||||
|
|
||||||
void BannerCache::CacheBannerInternal( CString BannerPath )
|
void BannerCache::CacheBannerInternal( CString BannerPath )
|
||||||
{
|
{
|
||||||
SDL_Surface *img = IMG_Load( BannerPath );
|
SDL_Surface *img = SDL_LoadImage( BannerPath );
|
||||||
if(img == NULL)
|
if(img == NULL)
|
||||||
RageException::Throw( "BannerCache::CacheBanner: Couldn't load %s: %s", BannerPath.c_str(), SDL_GetError() );
|
RageException::Throw( "BannerCache::CacheBanner: Couldn't load %s: %s", BannerPath.c_str(), SDL_GetError() );
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#include "arch/ArchHooks/ArchHooks.h"
|
#include "arch/ArchHooks/ArchHooks.h"
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#include "SDL_image.h"
|
|
||||||
#include "SDL_endian.h"
|
#include "SDL_endian.h"
|
||||||
#include "SDL_rotozoom.h"
|
#include "SDL_rotozoom.h"
|
||||||
#include "SDL_utils.h"
|
#include "SDL_utils.h"
|
||||||
@@ -83,7 +82,7 @@ void RageBitmapTexture::Create()
|
|||||||
/* Create (and return) a surface ready to be loaded to OpenGL */
|
/* Create (and return) a surface ready to be loaded to OpenGL */
|
||||||
/* Load the image into an SDL surface. */
|
/* Load the image into an SDL surface. */
|
||||||
ResolvePath( actualID.filename );
|
ResolvePath( actualID.filename );
|
||||||
SDL_Surface *img = IMG_Load( actualID.filename );
|
SDL_Surface *img = SDL_LoadImage( actualID.filename );
|
||||||
|
|
||||||
/* XXX: Wait, we don't want to throw for all images; in particular, we
|
/* XXX: Wait, we don't want to throw for all images; in particular, we
|
||||||
* want to tolerate corrupt/unknown background images. */
|
* want to tolerate corrupt/unknown background images. */
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "arch/arch.h"
|
#include "arch/arch.h"
|
||||||
#include "RageFile.h"
|
#include "RageFile.h"
|
||||||
#include "NoteDataUtil.h"
|
#include "NoteDataUtil.h"
|
||||||
|
#include "SDL_utils.h"
|
||||||
|
|
||||||
#include "NotesLoaderSM.h"
|
#include "NotesLoaderSM.h"
|
||||||
#include "NotesLoaderDWI.h"
|
#include "NotesLoaderDWI.h"
|
||||||
@@ -43,7 +44,6 @@
|
|||||||
#include "LyricsLoader.h"
|
#include "LyricsLoader.h"
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#include "SDL_image.h"
|
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
@@ -580,7 +580,7 @@ static void DeleteDuplicateSteps( Song *song, vector<Steps*> &vSteps )
|
|||||||
|
|
||||||
static bool ImageIsLoadable( const CString &sPath )
|
static bool ImageIsLoadable( const CString &sPath )
|
||||||
{
|
{
|
||||||
SDL_Surface *img = IMG_Load( sPath );
|
SDL_Surface *img = SDL_LoadImage( sPath );
|
||||||
if( !img )
|
if( !img )
|
||||||
{
|
{
|
||||||
LOG->Warn( "Error loading song image \"%s\": %s", sPath.c_str(), SDL_GetError() );
|
LOG->Warn( "Error loading song image \"%s\": %s", sPath.c_str(), SDL_GetError() );
|
||||||
@@ -821,7 +821,7 @@ void Song::TidyUpData()
|
|||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
CString sPath = m_sSongDir + arrayImages[i];
|
CString sPath = m_sSongDir + arrayImages[i];
|
||||||
SDL_Surface *img = IMG_Load( sPath );
|
SDL_Surface *img = SDL_LoadImage( sPath );
|
||||||
if( !img )
|
if( !img )
|
||||||
{
|
{
|
||||||
LOG->Trace("Couldn't load '%s': %s", sPath.c_str(), SDL_GetError());
|
LOG->Trace("Couldn't load '%s': %s", sPath.c_str(), SDL_GetError());
|
||||||
|
|||||||
Reference in New Issue
Block a user