diff --git a/src/image/codec/android-image.cpp b/src/image/codec/android-image.cpp index b4b13bf9..200d969a 100644 --- a/src/image/codec/android-image.cpp +++ b/src/image/codec/android-image.cpp @@ -57,7 +57,7 @@ bool AndroidImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not get JVM environment\n"); #endif - exit(1); + return false; } jclass cls = env->GetObjectClass(g_activity); jmethodID mid; @@ -72,7 +72,7 @@ bool AndroidImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not load %s\n", path); #endif - exit(1); + return false; } env->NewGlobalRef(bmp); @@ -109,7 +109,7 @@ bool AndroidImageData::Close() #if !LOL_RELEASE Log::Error("could not get JVM environment\n"); #endif - exit(1); + return false; } jclass cls = env->GetObjectClass(g_activity); jmethodID mid; diff --git a/src/image/codec/ios-image.cpp b/src/image/codec/ios-image.cpp index b4d440b4..486db9e0 100644 --- a/src/image/codec/ios-image.cpp +++ b/src/image/codec/ios-image.cpp @@ -59,7 +59,7 @@ bool IosImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not load %s\n", path); #endif - exit(1); + return false; } int w = CGImageGetWidth(image.CGImage); diff --git a/src/image/codec/ps3-image.cpp b/src/image/codec/ps3-image.cpp index 3ba5dc10..db992dc2 100644 --- a/src/image/codec/ps3-image.cpp +++ b/src/image/codec/ps3-image.cpp @@ -61,7 +61,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not open Fs sysmodule\n"); #endif - exit(1); + return false; } err = cellSysmoduleLoadModule(CELL_SYSMODULE_PNGDEC); @@ -70,7 +70,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not open PngDec sysmodule\n"); #endif - exit(1); + return false; } CellPngDecThreadInParam in_param; @@ -88,7 +88,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not create PngDec library\n"); #endif - exit(1); + return false; } /* Create decoder */ @@ -112,7 +112,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not open %s for decoding\n", file); #endif - exit(1); + return false; } CellPngDecInfo info; @@ -122,7 +122,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not read image header\n"); #endif - exit(1); + return false; } CellPngDecInParam in_dec_param; @@ -140,7 +140,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not configure PngDec decoder\n"); #endif - exit(1); + return false; } /* Decode image */ @@ -157,7 +157,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not run PngDec decoder\n"); #endif - exit(1); + return false; } /* Close decoder */ @@ -167,7 +167,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not close PngDec decoder\n"); #endif - exit(1); + return false; } /* Deinitialise library */ @@ -177,7 +177,7 @@ bool Ps3ImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not destroy PngDec decoder\n"); #endif - exit(1); + return false; } err = cellSysmoduleUnloadModule(CELL_SYSMODULE_PNGDEC); err = cellSysmoduleUnloadModule(CELL_SYSMODULE_FS); diff --git a/src/image/codec/sdl-image.cpp b/src/image/codec/sdl-image.cpp index 63a7c6c2..95a20ddf 100644 --- a/src/image/codec/sdl-image.cpp +++ b/src/image/codec/sdl-image.cpp @@ -58,8 +58,7 @@ bool SdlImageData::Open(char const *path) #if !LOL_RELEASE Log::Error("could not load %s\n", path); #endif - SDL_Quit(); - exit(1); + return false; } size = ivec2(img->w, img->h);