Fixed SDL_ScaleMode values for consistency

This commit is contained in:
Sam Lantinga
2023-02-03 13:23:02 -08:00
parent e5edce8e75
commit 14a4ce8b59
21 changed files with 70 additions and 47 deletions

View File

@@ -368,7 +368,7 @@ WatchJoystick(SDL_Joystick *joystick)
/* scale for platforms that don't give you the window size you asked for. */
SDL_SetRenderLogicalPresentation(screen, SCREEN_WIDTH, SCREEN_HEIGHT,
SDL_LOGICAL_PRESENTATION_LETTERBOX,
SDL_ScaleModeLinear);
SDL_SCALEMODE_LINEAR);
/* Print info about the joystick we are watching */
name = SDL_GetJoystickName(joystick);

View File

@@ -894,7 +894,7 @@ int render_testLogicalSize(void *arg)
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_GetRendererOutputSize, expected: 0, got: %i", ret);
ret = SDL_SetRenderLogicalPresentation(renderer, w / factor, h / factor,
SDL_LOGICAL_PRESENTATION_LETTERBOX,
SDL_ScaleModeNearest);
SDL_SCALEMODE_NEAREST);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderLogicalSize, expected: 0, got: %i", ret);
ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret);
@@ -907,7 +907,7 @@ int render_testLogicalSize(void *arg)
(void)SDL_RenderPresent(renderer);
ret = SDL_SetRenderLogicalPresentation(renderer, 0, 0,
SDL_LOGICAL_PRESENTATION_DISABLED,
SDL_ScaleModeNearest);
SDL_SCALEMODE_NEAREST);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderLogicalSize, expected: 0, got: %i", ret);
/* Check to see if final image matches. */
@@ -921,7 +921,7 @@ int render_testLogicalSize(void *arg)
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_GetRendererOutputSize, expected: 0, got: %i", ret);
ret = SDL_SetRenderLogicalPresentation(renderer, w / factor, h / factor,
SDL_LOGICAL_PRESENTATION_LETTERBOX,
SDL_ScaleModeNearest);
SDL_SCALEMODE_NEAREST);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderLogicalSize, expected: 0, got: %i", ret);
viewport.x = (TESTRENDER_SCREEN_W / 4) / factor;
viewport.y = (TESTRENDER_SCREEN_H / 4) / factor;
@@ -938,7 +938,7 @@ int render_testLogicalSize(void *arg)
(void)SDL_RenderPresent(renderer);
ret = SDL_SetRenderLogicalPresentation(renderer, 0, 0,
SDL_LOGICAL_PRESENTATION_DISABLED,
SDL_ScaleModeNearest);
SDL_SCALEMODE_NEAREST);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderLogicalSize, expected: 0, got: %i", ret);
/* Check to see if final image matches. */
@@ -969,7 +969,7 @@ int render_testLogicalSize(void *arg)
w - 2 * (TESTRENDER_SCREEN_W / 4),
h,
SDL_LOGICAL_PRESENTATION_LETTERBOX,
SDL_ScaleModeLinear);
SDL_SCALEMODE_LINEAR);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderLogicalSize, expected: 0, got: %i", ret);
ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret);
@@ -978,7 +978,7 @@ int render_testLogicalSize(void *arg)
(void)SDL_RenderPresent(renderer);
ret = SDL_SetRenderLogicalPresentation(renderer, 0, 0,
SDL_LOGICAL_PRESENTATION_DISABLED,
SDL_ScaleModeNearest);
SDL_SCALEMODE_NEAREST);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderLogicalSize, expected: 0, got: %i", ret);
/* Check to see if final image matches. */

View File

@@ -913,7 +913,7 @@ int main(int argc, char *argv[])
/* scale for platforms that don't give you the window size you asked for. */
SDL_SetRenderLogicalPresentation(screen, SCREEN_WIDTH, SCREEN_HEIGHT,
SDL_LOGICAL_PRESENTATION_LETTERBOX,
SDL_ScaleModeLinear);
SDL_SCALEMODE_LINEAR);
background_front = LoadTexture(screen, "gamepadmap.bmp", SDL_FALSE, NULL, NULL);
background_back = LoadTexture(screen, "gamepadmap_back.bmp", SDL_FALSE, NULL, NULL);