mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
emscripten: set ALLEGRO_NO_PRESERVE_TEXTURE
Doesn't seem to break anything there despite of using SDL2 backend.
This commit is contained in:
parent
fdb4a29a13
commit
f648d661e6
1 changed files with 2 additions and 3 deletions
|
@ -223,12 +223,11 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
||||||
al_android_set_apk_fs_interface();
|
al_android_set_apk_fs_interface();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(ALLEGRO_ANDROID) && !defined(ALLEGRO_IPHONE) && !defined(ALLEGRO_SDL)
|
#if !defined(ALLEGRO_ANDROID) && !defined(ALLEGRO_IPHONE) && (!defined(ALLEGRO_SDL) || defined(__EMSCRIPTEN__))
|
||||||
// We're always using OpenGL which already preserves textures on its own, so avoid
|
// 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.
|
// 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.
|
// Android and iOS can threw out the context, so bitmaps need to be preserved there.
|
||||||
// SDL2 backend seems to have some workaround for old SDL bug, worth looking into.
|
// Something should be eventually done about SDL2 backend as well.
|
||||||
// This will have to be revisited on mobile GNU/Linux platforms.
|
|
||||||
al_add_new_bitmap_flag(ALLEGRO_NO_PRESERVE_TEXTURE);
|
al_add_new_bitmap_flag(ALLEGRO_NO_PRESERVE_TEXTURE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue