]> git.lizzy.rs Git - nothing.git/commitdiff
(#773) Don't crash the game if blending is not supported
authorrexim <reximkut@gmail.com>
Sat, 6 Apr 2019 16:19:21 +0000 (23:19 +0700)
committerrexim <reximkut@gmail.com>
Sat, 6 Apr 2019 16:19:21 +0000 (23:19 +0700)
src/game.c

index e72670624608a8ce6fc035ebb3651ffaa65c1749..e9bfa4add9379619e3f4482098af6d2a6f57cb6c 100644 (file)
@@ -123,7 +123,6 @@ Game *create_game(const char *level_folder,
         lt,
         texture_from_bmp("images/cursor.bmp", renderer),
         SDL_DestroyTexture);
-    /* TODO(#773): If a specific blending is not supported that should not crash the entire game */
     if (SDL_SetTextureBlendMode(
             game->texture_cursor,
             SDL_ComposeCustomBlendMode(
@@ -133,8 +132,7 @@ Game *create_game(const char *level_folder,
                 SDL_BLENDFACTOR_ONE,
                 SDL_BLENDFACTOR_ZERO,
                 SDL_BLENDOPERATION_ADD)) < 0) {
-        log_fail("SDL error: %s\n", SDL_GetError());
-        RETURN_LT(lt, NULL);
+        log_warn("SDL error: %s\n", SDL_GetError());
     }
     game->cursor_x = 0;
     game->cursor_y = 0;