SDL_ScaleMode breaks enum naming convention

Here’s the declaration of SDL_ScaleMode:

/**
 *  \brief The scaling mode for a texture.
 */
typedef enum
{
    SDL_ScaleModeNearest, /**< nearest pixel sampling */
    SDL_ScaleModeLinear,  /**< linear filtering */
    SDL_ScaleModeBest     /**< anisotropic filtering */
} SDL_ScaleMode;

This just looks weird. It goes against the naming convention used throughout the library. For example, look at SDL_TextureAccess declared below:

/**
 *  \brief The access pattern allowed for a texture.
 */
typedef enum
{
    SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */
    SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */
    SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */
} SDL_TextureAccess;

I would have expected SDL_SCALEMODE_NEAREST, etc. Why go against the naming convention?

1 Like

SDL_ScaleMode was there since 2.0.10, but in 2.0.12 it was exposed as public enum rather than a private one. I didn’t even notice the different naming convention myself and I was the one to expose it within patch for 2.0.12.

It’s an easy fix though, worth changing it for 2.0.14 for sure.