mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 10:14:14 +00:00
SDL_GetFullscreenDisplayModes() follows the SDL_GetStringRule
This commit is contained in:
@@ -306,7 +306,7 @@ static int video_getWindowFlags(void *arg)
|
||||
static int video_getFullscreenDisplayModes(void *arg)
|
||||
{
|
||||
const SDL_DisplayID *displays;
|
||||
const SDL_DisplayMode **modes;
|
||||
const SDL_DisplayMode * const *modes;
|
||||
int count;
|
||||
int i;
|
||||
|
||||
@@ -321,7 +321,6 @@ static int video_getFullscreenDisplayModes(void *arg)
|
||||
SDLTest_AssertPass("Call to SDL_GetFullscreenDisplayModes(%" SDL_PRIu32 ")", displays[i]);
|
||||
SDLTest_AssertCheck(modes != NULL, "Validate returned value from function; expected != NULL; got: %p", modes);
|
||||
SDLTest_AssertCheck(count >= 0, "Validate number of modes; expected: >= 0; got: %d", count);
|
||||
SDL_free((void *)modes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +333,7 @@ static int video_getFullscreenDisplayModes(void *arg)
|
||||
static int video_getClosestDisplayModeCurrentResolution(void *arg)
|
||||
{
|
||||
const SDL_DisplayID *displays;
|
||||
const SDL_DisplayMode **modes;
|
||||
const SDL_DisplayMode * const *modes;
|
||||
SDL_DisplayMode current;
|
||||
const SDL_DisplayMode *closest;
|
||||
int i, num_modes;
|
||||
@@ -370,7 +369,6 @@ static int video_getClosestDisplayModeCurrentResolution(void *arg)
|
||||
current.h, closest->h);
|
||||
}
|
||||
}
|
||||
SDL_free((void *)modes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ print_mode(const char *prefix, const SDL_DisplayMode *mode)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
const SDL_DisplayID *displays;
|
||||
const SDL_DisplayMode **modes;
|
||||
const SDL_DisplayMode * const *modes;
|
||||
const SDL_DisplayMode *mode;
|
||||
int num_displays, i;
|
||||
SDLTest_CommonState *state;
|
||||
@@ -94,7 +94,6 @@ int main(int argc, char *argv[])
|
||||
(void)SDL_snprintf(prefix, sizeof(prefix), " MODE %d", m);
|
||||
print_mode(prefix, modes[m]);
|
||||
}
|
||||
SDL_free((void*)modes);
|
||||
|
||||
SDL_Log("\n");
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ static const SDL_DisplayMode *highlighted_mode = NULL;
|
||||
static void
|
||||
draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
|
||||
{
|
||||
const SDL_DisplayMode **modes;
|
||||
const SDL_DisplayMode * const *modes;
|
||||
char text[1024];
|
||||
const int lineHeight = 10;
|
||||
int i, j;
|
||||
@@ -143,7 +143,6 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
|
||||
column_chars = 0;
|
||||
}
|
||||
}
|
||||
SDL_free((void *)modes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user