mirror of https://github.com/encounter/SDL.git
Fixed compiler warnings
This commit is contained in:
parent
aebe17d34f
commit
9451cd81ae
|
@ -2095,35 +2095,37 @@ int SDL_GL_UnbindTexture(SDL_Texture *texture)
|
||||||
static SDL_BlendMode
|
static SDL_BlendMode
|
||||||
SDL_GetShortBlendMode(SDL_BlendMode blendMode)
|
SDL_GetShortBlendMode(SDL_BlendMode blendMode)
|
||||||
{
|
{
|
||||||
switch (blendMode) {
|
if (blendMode == SDL_BLENDMODE_NONE_FULL) {
|
||||||
case SDL_BLENDMODE_NONE_FULL:
|
|
||||||
return SDL_BLENDMODE_NONE;
|
return SDL_BLENDMODE_NONE;
|
||||||
case SDL_BLENDMODE_BLEND_FULL:
|
|
||||||
return SDL_BLENDMODE_BLEND;
|
|
||||||
case SDL_BLENDMODE_ADD_FULL:
|
|
||||||
return SDL_BLENDMODE_ADD;
|
|
||||||
case SDL_BLENDMODE_MOD_FULL:
|
|
||||||
return SDL_BLENDMODE_MOD;
|
|
||||||
default:
|
|
||||||
return blendMode;
|
|
||||||
}
|
}
|
||||||
|
if (blendMode == SDL_BLENDMODE_BLEND_FULL) {
|
||||||
|
return SDL_BLENDMODE_BLEND;
|
||||||
|
}
|
||||||
|
if (blendMode == SDL_BLENDMODE_ADD_FULL) {
|
||||||
|
return SDL_BLENDMODE_ADD;
|
||||||
|
}
|
||||||
|
if (blendMode == SDL_BLENDMODE_MOD_FULL) {
|
||||||
|
return SDL_BLENDMODE_MOD;
|
||||||
|
}
|
||||||
|
return blendMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDL_BlendMode
|
static SDL_BlendMode
|
||||||
SDL_GetLongBlendMode(SDL_BlendMode blendMode)
|
SDL_GetLongBlendMode(SDL_BlendMode blendMode)
|
||||||
{
|
{
|
||||||
switch (blendMode) {
|
if (blendMode == SDL_BLENDMODE_NONE) {
|
||||||
case SDL_BLENDMODE_NONE:
|
|
||||||
return SDL_BLENDMODE_NONE_FULL;
|
return SDL_BLENDMODE_NONE_FULL;
|
||||||
case SDL_BLENDMODE_BLEND:
|
|
||||||
return SDL_BLENDMODE_BLEND_FULL;
|
|
||||||
case SDL_BLENDMODE_ADD:
|
|
||||||
return SDL_BLENDMODE_ADD_FULL;
|
|
||||||
case SDL_BLENDMODE_MOD:
|
|
||||||
return SDL_BLENDMODE_MOD_FULL;
|
|
||||||
default:
|
|
||||||
return blendMode;
|
|
||||||
}
|
}
|
||||||
|
if (blendMode == SDL_BLENDMODE_BLEND) {
|
||||||
|
return SDL_BLENDMODE_BLEND_FULL;
|
||||||
|
}
|
||||||
|
if (blendMode == SDL_BLENDMODE_ADD) {
|
||||||
|
return SDL_BLENDMODE_ADD_FULL;
|
||||||
|
}
|
||||||
|
if (blendMode == SDL_BLENDMODE_MOD) {
|
||||||
|
return SDL_BLENDMODE_MOD_FULL;
|
||||||
|
}
|
||||||
|
return blendMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_BlendMode
|
SDL_BlendMode
|
||||||
|
|
|
@ -642,7 +642,6 @@ static GLenum GetBlendEquation(SDL_BlendOperation operation)
|
||||||
static SDL_bool
|
static SDL_bool
|
||||||
GL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
|
GL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
|
||||||
{
|
{
|
||||||
GL_RenderData *data = (GL_RenderData *) renderer->driverdata;
|
|
||||||
SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode);
|
SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode);
|
||||||
SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode);
|
SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode);
|
||||||
SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode);
|
SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode);
|
||||||
|
|
|
@ -416,7 +416,6 @@ static GLenum GetBlendEquation(SDL_BlendOperation operation)
|
||||||
static SDL_bool
|
static SDL_bool
|
||||||
GLES2_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
|
GLES2_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)
|
||||||
{
|
{
|
||||||
GLES2_DriverContext *data = (GLES2_DriverContext *) renderer->driverdata;
|
|
||||||
SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode);
|
SDL_BlendFactor srcColorFactor = SDL_GetBlendModeSrcColorFactor(blendMode);
|
||||||
SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode);
|
SDL_BlendFactor srcAlphaFactor = SDL_GetBlendModeSrcAlphaFactor(blendMode);
|
||||||
SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode);
|
SDL_BlendOperation colorOperation = SDL_GetBlendModeColorOperation(blendMode);
|
||||||
|
|
Loading…
Reference in New Issue