diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-18 04:18:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-18 04:18:31 +0300 |
commit | ea7ce2d1099761d4f10a1985cc1491dd306093fb (patch) | |
tree | 0ecc2ba76c949af2876ea3fe532d3796d4d0f666 | |
parent | d5a295a5ef8338a6d292bb3c60bddcfb8baf17bc (diff) | |
download | manaplus-ea7ce2d1099761d4f10a1985cc1491dd306093fb.tar.gz manaplus-ea7ce2d1099761d4f10a1985cc1491dd306093fb.tar.bz2 manaplus-ea7ce2d1099761d4f10a1985cc1491dd306093fb.tar.xz manaplus-ea7ce2d1099761d4f10a1985cc1491dd306093fb.zip |
Replace SDL macro defines to SDL_GetError.
-rw-r--r-- | src/gui/fonts/font.cpp | 8 | ||||
-rw-r--r-- | src/net/sdltcpnet.cpp | 2 | ||||
-rw-r--r-- | src/resources/imagehelper.cpp | 4 | ||||
-rw-r--r-- | src/resources/loaders/musicloader.cpp | 2 | ||||
-rw-r--r-- | src/resources/loaders/soundloader.cpp | 2 | ||||
-rw-r--r-- | src/resources/openglimagehelper.cpp | 2 | ||||
-rw-r--r-- | src/resources/safeopenglimagehelper.cpp | 2 | ||||
-rw-r--r-- | src/resources/sdlimagehelper.cpp | 2 | ||||
-rw-r--r-- | src/soundmanager.cpp | 4 |
9 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/fonts/font.cpp b/src/gui/fonts/font.cpp index a2919481c..2ac2bcb4a 100644 --- a/src/gui/fonts/font.cpp +++ b/src/gui/fonts/font.cpp @@ -116,7 +116,7 @@ Font::Font(std::string filename, if (TTF_Init() == -1) { logger->error("Unable to initialize SDL_ttf: " + - std::string(TTF_GetError())); + std::string(SDL_GetError())); } } @@ -154,7 +154,7 @@ Font::Font(std::string filename, filename.c_str()); #endif // UNITTESTS logger->error("Font::Font: " + - std::string(TTF_GetError())); + std::string(SDL_GetError())); } else { @@ -222,7 +222,7 @@ void Font::loadFont(std::string filename, if (fontCounter == 0 && TTF_Init() == -1) { logger->log("Unable to initialize SDL_ttf: " + - std::string(TTF_GetError())); + std::string(SDL_GetError())); return; } @@ -232,7 +232,7 @@ void Font::loadFont(std::string filename, if (font == nullptr) { logger->log("Font::Font: " + - std::string(TTF_GetError())); + std::string(SDL_GetError())); return; } diff --git a/src/net/sdltcpnet.cpp b/src/net/sdltcpnet.cpp index 063bf806f..dbfa2d5d6 100644 --- a/src/net/sdltcpnet.cpp +++ b/src/net/sdltcpnet.cpp @@ -97,7 +97,7 @@ int TcpNet::send(const TcpNet::Socket sock, const void *const data, const char *TcpNet::getError() { - return SDLNet_GetError(); + return SDL_GetError(); } int TcpNet::resolveHost(IPaddress *const address, const char *const host, diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp index be6f96ab3..76747979b 100644 --- a/src/resources/imagehelper.cpp +++ b/src/resources/imagehelper.cpp @@ -51,7 +51,7 @@ Image *ImageHelper::load(SDL_RWops *const rw) SDL_Surface *const tmpImage = loadPng(rw); if (tmpImage == nullptr) { - logger->log("Error, image load failed: %s", IMG_GetError()); + logger->log("Error, image load failed: %s", SDL_GetError()); return nullptr; } @@ -67,7 +67,7 @@ Image *ImageHelper::load(SDL_RWops *const rw, Dye const &dye) SDL_Surface *const tmpImage = loadPng(rw); if (tmpImage == nullptr) { - logger->log("Error, image load failed: %s", IMG_GetError()); + logger->log("Error, image load failed: %s", SDL_GetError()); BLOCK_END("ImageHelper::load") return nullptr; } diff --git a/src/resources/loaders/musicloader.cpp b/src/resources/loaders/musicloader.cpp index e734ddce6..7ac151c12 100644 --- a/src/resources/loaders/musicloader.cpp +++ b/src/resources/loaders/musicloader.cpp @@ -67,7 +67,7 @@ namespace } #endif // USE_SDL2 - logger->log("Error, failed to load music: %s", Mix_GetError()); + logger->log("Error, failed to load music: %s", SDL_GetError()); return nullptr; } }; diff --git a/src/resources/loaders/soundloader.cpp b/src/resources/loaders/soundloader.cpp index b99b48b6c..879bc0cb1 100644 --- a/src/resources/loaders/soundloader.cpp +++ b/src/resources/loaders/soundloader.cpp @@ -61,7 +61,7 @@ namespace return new SoundEffect(tmpSoundEffect, rl->path); } reportAlways("Error, failed to load sound effect: %s", - Mix_GetError()); + SDL_GetError()); return nullptr; } }; diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 87972f5c3..6c30c6a73 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -74,7 +74,7 @@ Image *OpenGLImageHelper::load(SDL_RWops *const rw, Dye const &dye) SDL_Surface *const tmpImage = loadPng(rw); if (tmpImage == nullptr) { - reportAlways("Error, image load failed: %s", IMG_GetError()); + reportAlways("Error, image load failed: %s", SDL_GetError()); return nullptr; } diff --git a/src/resources/safeopenglimagehelper.cpp b/src/resources/safeopenglimagehelper.cpp index 118dea49d..2fcff7eb0 100644 --- a/src/resources/safeopenglimagehelper.cpp +++ b/src/resources/safeopenglimagehelper.cpp @@ -71,7 +71,7 @@ Image *SafeOpenGLImageHelper::load(SDL_RWops *const rw, SDL_Surface *const tmpImage = loadPng(rw); if (tmpImage == nullptr) { - logger->log("Error, image load failed: %s", IMG_GetError()); + logger->log("Error, image load failed: %s", SDL_GetError()); return nullptr; } diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp index 21bc75b0b..fecd11482 100644 --- a/src/resources/sdlimagehelper.cpp +++ b/src/resources/sdlimagehelper.cpp @@ -62,7 +62,7 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye) if (tmpImage == nullptr) { reportAlways("Error, image load failed: %s", - IMG_GetError()); + SDL_GetError()); return nullptr; } diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp index a4ee3acee..9a325b7b6 100644 --- a/src/soundmanager.cpp +++ b/src/soundmanager.cpp @@ -173,7 +173,7 @@ void SoundManager::init() if (res < 0) { logger->log("SoundManager::init Could not initialize audio: %s", - Mix_GetError()); + SDL_GetError()); if (Mix_OpenAudio(22010, MIX_DEFAULT_FORMAT, 2, audioBuffer) < 0) return; logger->log("Fallback to stereo audio"); @@ -228,7 +228,7 @@ void SoundManager::testAudio() if (SDL_OpenAudio(&desired, &actual) < 0) { logger->log("SoundManager::testAudio error: %s", - Mix_GetError()); + SDL_GetError()); return; } if (desired.freq != actual.freq) |