use ALLEGRO_NO_PRESERVE_TEXTURE on SDL2

seems there's no reason not to; it even fixes some stuff
This commit is contained in:
Sebastian Krzyszkowiak 2019-02-13 22:54:49 +01:00
parent 379ba8f629
commit 886034e596
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -230,11 +230,10 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
al_android_set_apk_fs_interface();
#endif
#if !defined(ALLEGRO_ANDROID) && !defined(ALLEGRO_IPHONE) && (!defined(ALLEGRO_SDL) || defined(__EMSCRIPTEN__))
#if !defined(ALLEGRO_ANDROID) && !defined(ALLEGRO_IPHONE)
// We're always using OpenGL which already preserves textures on its own, so avoid
// excessive RAM usage by not backuping the bitmaps when not necessary.
// Android and iOS can threw out the context, so bitmaps need to be preserved there.
// Something should be eventually done about SDL2 backend as well.
al_add_new_bitmap_flag(ALLEGRO_NO_PRESERVE_TEXTURE);
#endif