Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)
This commit is contained in:
@@ -82,12 +82,12 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
|
||||
|
||||
y += lineHeight;
|
||||
|
||||
SDL_strlcpy(text, "Click on a mode to set it with SDL_SetWindowFullscreenMode", sizeof text);
|
||||
SDL_strlcpy(text, "Click on a mode to set it with SDL_SetWindowFullscreenMode", sizeof(text));
|
||||
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
||||
SDLTest_DrawString(renderer, x, y, text);
|
||||
y += lineHeight;
|
||||
|
||||
SDL_strlcpy(text, "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN", sizeof text);
|
||||
SDL_strlcpy(text, "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN", sizeof(text));
|
||||
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
|
||||
SDLTest_DrawString(renderer, x, y, text);
|
||||
y += lineHeight;
|
||||
@@ -109,7 +109,7 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
|
||||
SDL_FRect cell_rect;
|
||||
const SDL_DisplayMode *mode = modes[j];
|
||||
|
||||
(void)SDL_snprintf(text, sizeof text, "%s mode %d: %dx%d@%gHz",
|
||||
(void)SDL_snprintf(text, sizeof(text), "%s mode %d: %dx%d@%gHz",
|
||||
SDL_GetDisplayName(display_id),
|
||||
j, mode->pixel_w, mode->pixel_h, mode->refresh_rate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user