Parcourir la source

Added SDL_FLIP_DIAGONAL

Since SDL_RenderFlip is an enum, SDL_FLIP_HORIZONTAL and SDL_FLIP_VERTICAL can not be OR'ed to get the "SDL_FLIP_DIAGONAL".
Render code is actually able to perform these 3 kind of "flipping" so I just added a new enum called SDL_FLIP_DIAGONAL with the OR'ed value (3) so it can be used.
RPP-dev il y a 1 an
Parent
commit
b9ab326982
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      include/SDL3/SDL_surface.h

+ 4 - 3
include/SDL3/SDL_surface.h

@@ -80,9 +80,10 @@ typedef enum
  */
 typedef enum
 {
-    SDL_FLIP_NONE,          /**< Do not flip */
-    SDL_FLIP_HORIZONTAL,    /**< flip horizontally */
-    SDL_FLIP_VERTICAL       /**< flip vertically */
+    SDL_FLIP_NONE       = 0x00,     /**< Do not flip */
+    SDL_FLIP_HORIZONTAL = 0x01,     /**< flip horizontally */
+    SDL_FLIP_VERTICAL   = 0x02,     /**< flip vertically */
+    SDL_FLIP_DIAGONAL   = 0x03,     /**< flip diagonally (both horizontally and vertically) */
 } SDL_FlipMode;
 
 /**