WINTERMUTE: Make the messiest warnings warn just once.

This commit is contained in:
Einar Johan Trøan Sømåen 2012-05-09 20:04:11 +02:00 committed by Einar Johan Trøan Sømåen
parent b6f512f392
commit f07690cb96
2 changed files with 9 additions and 2 deletions

View File

@ -820,7 +820,7 @@ CBFile *CBFileManager::OpenFileRaw(const char *Filename) {
return NULL;
}
}
warning("BFileManager::OpenFileRaw(%s)", Filename);
CBDiskFile *DiskFile = new CBDiskFile(Game);
if (SUCCEEDED(DiskFile->Open(Filename))) return DiskFile;

View File

@ -135,7 +135,14 @@ HRESULT CBSurfaceSDL::Create(char *Filename, bool default_ck, byte ck_red, byte
//SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "best"); //TODO
//_texture = SdlUtil::CreateTextureFromSurface(renderer->GetSdlRenderer(), surf);
warning("Surface-textures not fully ported yet");
// This particular warning is rather messy, as this function is called a ton,
// thus we avoid printing it more than once.
static bool hasWarned = false;
if (!hasWarned) {
warning("Surface-textures not fully ported yet");
hasWarned = true;
}
#if 0
_texture = SDL_CreateTextureFromSurface(renderer->GetSdlRenderer(), surf);
if (!_texture) {