From 6218ca6b1efe943210b72352ece9f81945a74e74 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 7 Sep 2024 06:29:19 +0300
Subject: [PATCH 29/29] sdl3: Drop unused flags parameter from create_surf()

See RM #837

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-sdl3/action_dialog.c    |  2 +-
 client/gui-sdl3/canvas.c           |  2 +-
 client/gui-sdl3/citydlg.c          |  2 +-
 client/gui-sdl3/dialogs.c          |  4 ++--
 client/gui-sdl3/graphics.c         | 19 +++++++++----------
 client/gui-sdl3/graphics.h         |  5 ++---
 client/gui-sdl3/gui_mouse.c        |  2 +-
 client/gui-sdl3/gui_string.c       |  6 +++---
 client/gui-sdl3/gui_tilespec.c     |  4 ++--
 client/gui-sdl3/helpdlg.c          |  4 ++--
 client/gui-sdl3/mapctrl.c          | 11 +++++------
 client/gui-sdl3/mapview.c          |  3 +--
 client/gui-sdl3/optiondlg.c        |  2 +-
 client/gui-sdl3/repodlgs.c         |  4 ++--
 client/gui-sdl3/widget.c           | 17 ++++++++---------
 client/gui-sdl3/widget_icon.c      | 17 ++++++++---------
 client/gui-sdl3/widget_label.c     |  4 ++--
 client/gui-sdl3/widget_scrollbar.c |  8 ++++----
 client/gui-sdl3/widget_window.c    |  5 ++---
 client/gui-sdl3/wldlg.c            |  2 +-
 20 files changed, 58 insertions(+), 65 deletions(-)

diff --git a/client/gui-sdl3/action_dialog.c b/client/gui-sdl3/action_dialog.c
index d10857991e..52024589dd 100644
--- a/client/gui-sdl3/action_dialog.c
+++ b/client/gui-sdl3/action_dialog.c
@@ -1501,7 +1501,7 @@ void popup_sabotage_dialog(struct unit *actor, struct city *pcity,
     if (buf->id == ID_SEPARATOR) {
       FREESURFACE(buf->theme);
       buf->size.h = h;
-      buf->theme = create_surf(w, h, SDL_SWSURFACE);
+      buf->theme = create_surf(w, h);
 
       area2.y = buf->size.h / 2 - 1;
       area2.w = buf->size.w - adj_size(20);
diff --git a/client/gui-sdl3/canvas.c b/client/gui-sdl3/canvas.c
index cd4839fcb6..64154a1802 100644
--- a/client/gui-sdl3/canvas.c
+++ b/client/gui-sdl3/canvas.c
@@ -39,7 +39,7 @@ struct canvas *canvas_create(int width, int height)
 {
   struct canvas *result = fc_malloc(sizeof(*result));
 
-  result->surf = create_surf(width, height, SDL_SWSURFACE);
+  result->surf = create_surf(width, height);
 
   return result;
 }
diff --git a/client/gui-sdl3/citydlg.c b/client/gui-sdl3/citydlg.c
index 010db20a41..9bf399da7d 100644
--- a/client/gui-sdl3/citydlg.c
+++ b/client/gui-sdl3/citydlg.c
@@ -677,7 +677,7 @@ static SDL_Surface *create_unit_surface(struct unit *punit, bool support,
 
   }
 
-  psurf = create_surf(src_rect.w, src_rect.h, SDL_SWSURFACE);
+  psurf = create_surf(src_rect.w, src_rect.h);
   alphablit(destcanvas->surf, &src_rect, psurf, NULL, 255);
 
   canvas_free(destcanvas);
diff --git a/client/gui-sdl3/dialogs.c b/client/gui-sdl3/dialogs.c
index 117f4b6fc2..1143effc1d 100644
--- a/client/gui-sdl3/dialogs.c
+++ b/client/gui-sdl3/dialogs.c
@@ -2179,7 +2179,7 @@ void popup_advanced_terrain_dialog(struct tile *ptile,
     if (buf->id == ID_SEPARATOR) {
       FREESURFACE(buf->theme);
       buf->size.h = h;
-      buf->theme = create_surf(w, h, SDL_SWSURFACE);
+      buf->theme = create_surf(w, h);
 
       area2.y = buf->size.h / 2 - 1;
       area2.w = buf->size.w - adj_size(20);
@@ -3154,7 +3154,7 @@ void popup_races_dialog(struct player *pplayer)
   /* Create nations list */
 
   /* Create Imprv Background Icon */
-  main_bg = create_surf(adj_size(96*2), adj_size(64), SDL_SWSURFACE);
+  main_bg = create_surf(adj_size(96*2), adj_size(64));
 
   SDL_FillSurfaceRect(main_bg, NULL,
                       map_rgba(main_bg->format, bg_color));
diff --git a/client/gui-sdl3/graphics.c b/client/gui-sdl3/graphics.c
index 950c381036..314c65b01c 100644
--- a/client/gui-sdl3/graphics.c
+++ b/client/gui-sdl3/graphics.c
@@ -107,14 +107,14 @@ struct gui_layer *add_gui_layer(int width, int height)
   struct gui_layer *gui_layer = NULL;
   SDL_Surface *buffer;
 
-  buffer = create_surf(width, height, SDL_SWSURFACE);
+  buffer = create_surf(width, height);
   gui_layer = gui_layer_new(0, 0, buffer);
 
-  /* add to buffers array */
+  /* Add to buffers array */
   if (main_data.guis) {
     int i;
 
-    /* find NULL element */
+    /* Find NULL element */
     for (i = 0; i < main_data.guis_count; i++) {
       if (!main_data.guis[i]) {
         main_data.guis[i] = gui_layer;
@@ -334,7 +334,7 @@ SDL_Surface *create_surf_with_format(SDL_PixelFormat *pf,
 /**********************************************************************//**
   Create surface with the same format as main window
 **************************************************************************/
-SDL_Surface *create_surf(int width, int height, Uint32 flags)
+SDL_Surface *create_surf(int width, int height)
 {
   return create_surf_with_format(main_surface->format, width, height);
 }
@@ -351,13 +351,12 @@ SDL_Surface *convert_surf(SDL_Surface *surf_in)
   Create an surface with screen format and fill with color.
   If pcolor == NULL surface is filled with transparent white A = 128
 **************************************************************************/
-SDL_Surface *create_filled_surface(Uint16 w, Uint16 h, Uint32 flags,
-                                   SDL_Color *pcolor)
+SDL_Surface *create_filled_surface(Uint16 w, Uint16 h, SDL_Color *pcolor)
 {
   SDL_Surface *new_surf;
   SDL_Color color = {255, 255, 255, 128};
 
-  new_surf = create_surf(w, h, flags);
+  new_surf = create_surf(w, h);
 
   if (!new_surf) {
     return NULL;
@@ -573,7 +572,7 @@ bool create_surfaces(int width, int height)
 
   if (main_data.gui) {
     FREESURFACE(main_data.gui->surface);
-    main_data.gui->surface = create_surf(width, height, SDL_SWSURFACE);
+    main_data.gui->surface = create_surf(width, height);
   } else {
     main_data.gui = add_gui_layer(width, height);
   }
@@ -681,7 +680,7 @@ int fill_rect_alpha(SDL_Surface *surf, SDL_Rect *prect,
     return -3;
   }
 
-  colorbar = create_surf(surf->w, surf->h, 0);
+  colorbar = create_surf(surf->w, surf->h);
 
   SDL_FillSurfaceRect(colorbar, prect,
                       SDL_MapRGB(surf->format,
@@ -1101,7 +1100,7 @@ SDL_Surface *resize_surface_box(const SDL_Surface *psrc,
       0, 0
     };
 
-    result = create_surf(new_width, new_height, SDL_SWSURFACE);
+    result = create_surf(new_width, new_height);
     alphablit(tmp_surface, NULL, result, &area, 255);
     FREESURFACE(tmp_surface);
   } else {
diff --git a/client/gui-sdl3/graphics.h b/client/gui-sdl3/graphics.h
index 8075daf48e..9a5d08447c 100644
--- a/client/gui-sdl3/graphics.h
+++ b/client/gui-sdl3/graphics.h
@@ -244,11 +244,10 @@ SDL_Surface *load_surf(const char *fname);
 
 SDL_Surface *create_surf_with_format(SDL_PixelFormat *pf,
                                      int width, int height);
-SDL_Surface *create_surf(int width, int height, Uint32 flags);
+SDL_Surface *create_surf(int width, int height);
 SDL_Surface *convert_surf(SDL_Surface *surf_in);
 
-SDL_Surface *create_filled_surface(Uint16 w, Uint16 h, Uint32 flags,
-                                   SDL_Color *pcolor);
+SDL_Surface *create_filled_surface(Uint16 w, Uint16 h, SDL_Color *pcolor);
 
 SDL_Surface *crop_rect_from_surface(SDL_Surface *psource,
                                     SDL_Rect *prect);
diff --git a/client/gui-sdl3/gui_mouse.c b/client/gui-sdl3/gui_mouse.c
index 19c02c60fe..d05b41d0fe 100644
--- a/client/gui-sdl3/gui_mouse.c
+++ b/client/gui-sdl3/gui_mouse.c
@@ -137,7 +137,7 @@ void load_cursors(void)
 
   std_cursor = SDL_GetCursor();
 
-  surf = create_surf(1, 1, SDL_SWSURFACE);
+  surf = create_surf(1, 1);
   disabled_cursor = SurfaceToCursor(surf, 0, 0);
   FREESURFACE(surf);
 
diff --git a/client/gui-sdl3/gui_string.c b/client/gui-sdl3/gui_string.c
index d3ba42ad4f..a8ec793007 100644
--- a/client/gui-sdl3/gui_string.c
+++ b/client/gui-sdl3/gui_string.c
@@ -323,7 +323,7 @@ static SDL_Surface *create_utf8_surf(utf8_str *pstr)
     log_debug("create_utf8_surf: String is %d length", text->w);
   } else {
     log_debug("create_utf8_surf: text NULL");
-    text = create_surf(0, 0, SDL_SWSURFACE);
+    text = create_surf(0, 0);
   }
 
   if (!((pstr->style & 0x0F) & TTF_STYLE_NORMAL)) {
@@ -371,7 +371,7 @@ static SDL_Surface *create_utf8_multi_surf(utf8_str *pstr)
 
   switch (pstr->render) {
   case 1:
-    text = create_surf(w, count * tmp[0]->h, SDL_SWSURFACE);
+    text = create_surf(w, count * tmp[0]->h);
     SDL_FillSurfaceRect(text, NULL, color);
     SDL_SetSurfaceColorKey(text, SDL_TRUE, color);
     break;
@@ -381,7 +381,7 @@ static SDL_Surface *create_utf8_multi_surf(utf8_str *pstr)
     SDL_FillSurfaceRect(text, NULL, color);
     break;
   default:
-    text = create_surf(w, count * tmp[0]->h, SDL_SWSURFACE);
+    text = create_surf(w, count * tmp[0]->h);
     SDL_FillSurfaceRect(text, NULL, color);
     break;
   }
diff --git a/client/gui-sdl3/gui_tilespec.c b/client/gui-sdl3/gui_tilespec.c
index bc2abfc9c4..16d415d0d3 100644
--- a/client/gui-sdl3/gui_tilespec.c
+++ b/client/gui-sdl3/gui_tilespec.c
@@ -194,7 +194,7 @@ void tilespec_setup_city_icons(void)
 
   load_city_icon_surface(spr, police, "city.police");
   /* ================================================================= */
-  icons->worklist = create_surf(9,9, SDL_SWSURFACE);
+  icons->worklist = create_surf(9, 9);
   SDL_FillSurfaceRect(icons->worklist, NULL,
                       SDL_MapRGB(icons->worklist->format, 255, 255,255));
 
@@ -381,7 +381,7 @@ void setup_auxiliary_tech_icons(void)
   pstr->style |= (TTF_STYLE_BOLD | SF_CENTER);
 
   /* Create icons */
-  surf = create_surf(adj_size(50), adj_size(50), SDL_SWSURFACE);
+  surf = create_surf(adj_size(50), adj_size(50));
   SDL_FillSurfaceRect(surf, NULL, map_rgba(surf->format, bg_color));
   create_frame(surf,
                0 , 0, surf->w - 1, surf->h - 1,
diff --git a/client/gui-sdl3/helpdlg.c b/client/gui-sdl3/helpdlg.c
index f979195bef..99688e93ca 100644
--- a/client/gui-sdl3/helpdlg.c
+++ b/client/gui-sdl3/helpdlg.c
@@ -275,7 +275,7 @@ void popup_impr_info(Impr_type_id impr)
     pstr->style |= (TTF_STYLE_BOLD | SF_CENTER);
 
     /* Background template for entries in scroll list */
-    background_tmpl = create_surf(adj_size(135), adj_size(40), SDL_SWSURFACE);
+    background_tmpl = create_surf(adj_size(135), adj_size(40));
     SDL_FillSurfaceRect(background_tmpl, NULL,
                         map_rgba(background_tmpl->format, bg_color));
 
@@ -705,7 +705,7 @@ void popup_unit_info(Unit_type_id type_id)
     pstr->style |= (TTF_STYLE_BOLD | SF_CENTER);
 
     /* Background template for entries in scroll list */
-    background_tmpl = create_surf(adj_size(135), adj_size(40), SDL_SWSURFACE);
+    background_tmpl = create_surf(adj_size(135), adj_size(40));
     SDL_FillSurfaceRect(background_tmpl, NULL,
                         map_rgba(background_tmpl->format, bg_color));
 
diff --git a/client/gui-sdl3/mapctrl.c b/client/gui-sdl3/mapctrl.c
index a116c689e3..e912d7a5b5 100644
--- a/client/gui-sdl3/mapctrl.c
+++ b/client/gui-sdl3/mapctrl.c
@@ -935,7 +935,7 @@ static void remake_unitinfo(int w, int h)
   pwidget->size.y = main_window_height() - h;
 
   FREESURFACE(pwidget->theme);
-  pwidget->theme = create_surf(w, h, SDL_SWSURFACE);
+  pwidget->theme = create_surf(w, h);
 
   draw_frame(pwidget->theme, 0, 0, pwidget->size.w, pwidget->size.h);
 
@@ -1534,7 +1534,7 @@ void popup_unitinfo_window(void)
 
   /* Make UNITS Icon */
   icon_theme = create_surf(current_theme->map_icon->w,
-                           current_theme->map_icon->h, SDL_SWSURFACE);
+                           current_theme->map_icon->h);
   alphablit(current_theme->map_icon, NULL, icon_theme, NULL, 255);
   alphablit(current_theme->r_arrow_icon, NULL, icon_theme, NULL, 255);
 
@@ -1759,12 +1759,11 @@ void popup_minimap_window(void)
   add_to_gui_list(ID_CLIENT_OPTIONS, options_button);
 #endif /* GUI_SDL3_SMALL_SCREEN */
 
-  /* show/hide minimap button */
+  /* Show/hide minimap button */
 
-  /* make Map Icon */
+  /* Make Map Icon */
   icon_theme = create_surf(current_theme->map_icon->w,
-                           current_theme->map_icon->h,
-                           SDL_SWSURFACE);
+                           current_theme->map_icon->h);
   alphablit(current_theme->map_icon, NULL, icon_theme, NULL, 255);
   alphablit(current_theme->l_arrow_icon, NULL, icon_theme, NULL, 255);
 
diff --git a/client/gui-sdl3/mapview.c b/client/gui-sdl3/mapview.c
index 09ac1c5703..7376b0156d 100644
--- a/client/gui-sdl3/mapview.c
+++ b/client/gui-sdl3/mapview.c
@@ -824,8 +824,7 @@ void redraw_unit_info_label(struct unit_list *punitlist)
           astr_free(&addition);
 
           buf_surf = create_surf(tileset_full_tile_width(tileset),
-                                 tileset_full_tile_height(tileset),
-                                 SDL_SWSURFACE);
+                                 tileset_full_tile_height(tileset));
 
           destcanvas = canvas_create(tileset_full_tile_width(tileset),
                                      tileset_full_tile_height(tileset));
diff --git a/client/gui-sdl3/optiondlg.c b/client/gui-sdl3/optiondlg.c
index fa1852452d..992363aea1 100644
--- a/client/gui-sdl3/optiondlg.c
+++ b/client/gui-sdl3/optiondlg.c
@@ -1315,7 +1315,7 @@ static void option_dialog_worklist(struct option_dialog *pdialog)
   area.y += adj_size(12);
   area.w -= adj_size(12) + adj_size(12);
   area.h -= adj_size(12) + adj_size(12);
-  background->theme = create_surf(area.w, area.h, SDL_SWSURFACE);
+  background->theme = create_surf(area.w, area.h);
   widget_set_area(background, area);
   widget_set_position(background, area.x, area.y);
   SDL_FillSurfaceRect(background->theme, NULL,
diff --git a/client/gui-sdl3/repodlgs.c b/client/gui-sdl3/repodlgs.c
index ffa8bd3e1f..cef62d63cc 100644
--- a/client/gui-sdl3/repodlgs.c
+++ b/client/gui-sdl3/repodlgs.c
@@ -2102,7 +2102,7 @@ void economy_report_dialog_popup(bool make_modal)
   if (entries_used > 0) {
 
     /* Create Imprv Background Icon */
-    background = create_surf(adj_size(116), adj_size(116), SDL_SWSURFACE);
+    background = create_surf(adj_size(116), adj_size(116));
 
     SDL_FillSurfaceRect(background, NULL, map_rgba(background->format, bg_color));
 
@@ -2447,7 +2447,7 @@ SDL_Surface *create_select_tech_icon(utf8_str *pstr, Tech_type_id tech_id,
   text = create_text_surf_smaller_than_w(pstr, adj_size(100 - 4));
 
   /* Create label surface */
-  surf = create_surf(w, h, SDL_SWSURFACE);
+  surf = create_surf(w, h);
 
   if (tech_id == research_get(client_player())->researching) {
     color.a = 180;
diff --git a/client/gui-sdl3/widget.c b/client/gui-sdl3/widget.c
index f4fe1aec07..85ce003f11 100644
--- a/client/gui-sdl3/widget.c
+++ b/client/gui-sdl3/widget.c
@@ -109,12 +109,12 @@ SDL_Surface *create_bcgnd_surf(SDL_Surface *ptheme, enum widget_state state,
   j = MAX(tile_width_height_end * 2, height);
   zoom = ((i != width) ||  (j != height));
 
-  /* now allocate memory */
-  background = create_surf(i, j, SDL_SWSURFACE);
+  /* Now allocate memory */
+  background = create_surf(i, j);
 
-  /* copy left end */
+  /* Copy left end */
 
-  /* left top */
+  /* Left top */
   src.x = 0;
   src.y = start_y;
   src.w = tile_width_len_end;
@@ -478,16 +478,15 @@ void redraw_widget_info_label(SDL_Rect *rect)
     pwidget->info_label->style |= TTF_STYLE_BOLD;
     pwidget->info_label->fgcol = *get_theme_color(COLOR_THEME_QUICK_INFO_TEXT);
 
-    /* create string and bcgd theme */
+    /* Create string and bcgd theme */
     text = create_text_surf_from_utf8(pwidget->info_label);
 
     pwidget->info_label->fgcol = color;
 
     info_label = create_filled_surface(text->w + adj_size(10), text->h + adj_size(6),
-                                       SDL_SWSURFACE,
                                        get_theme_color(COLOR_THEME_QUICK_INFO_BG));
 
-    /* calculate start position */
+    /* Calculate start position */
     if ((pwidget->dst->dest_rect.y + pwidget->size.y) - info_label->h - adj_size(6) < 0) {
       info_area->y = (pwidget->dst->dest_rect.y + pwidget->size.y) + pwidget->size.h + adj_size(3);
     } else {
@@ -503,7 +502,7 @@ void redraw_widget_info_label(SDL_Rect *rect)
     info_area->w = info_label->w + adj_size(2);
     info_area->h = info_label->h + adj_size(3);
 
-    /* draw text */
+    /* Draw text */
     dstrect.x = adj_size(6);
     dstrect.y = adj_size(3);
 
@@ -511,7 +510,7 @@ void redraw_widget_info_label(SDL_Rect *rect)
 
     FREESURFACE(text);
 
-    /* draw frame */
+    /* Draw frame */
     create_frame(info_label,
                  0, 0, info_label->w - 1, info_label->h - 1,
                  get_theme_color(COLOR_THEME_QUICK_INFO_FRAME));
diff --git a/client/gui-sdl3/widget_icon.c b/client/gui-sdl3/widget_icon.c
index 92e9c85894..9744dd2fac 100644
--- a/client/gui-sdl3/widget_icon.c
+++ b/client/gui-sdl3/widget_icon.c
@@ -159,39 +159,38 @@ SDL_Surface *create_icon_theme_surf(SDL_Surface *icon)
   SDL_Surface *ptheme;
 
   get_smaller_surface_rect(icon, &src);
-  ptheme = create_surf((src.w + adj_size(4)) * 4, src.h + adj_size(4),
-                       SDL_SWSURFACE);
+  ptheme = create_surf((src.w + adj_size(4)) * 4, src.h + adj_size(4));
 
   dest.x = adj_size(2);
   dest.y = (ptheme->h - src.h) / 2;
 
-  /* normal */
+  /* Normal */
   alphablit(icon, &src, ptheme, &dest, 255);
 
-  /* selected */
+  /* Selected */
   dest.x += (src.w + adj_size(4));
   alphablit(icon, &src, ptheme, &dest, 255);
 
-  /* draw selected frame */
+  /* Draw selected frame */
   create_frame(ptheme,
                dest.x - 1, dest.y - 1, src.w + 1, src.h + 1,
                get_theme_color(COLOR_THEME_CUSTOM_WIDGET_SELECTED_FRAME));
 
-  /* pressed */
+  /* Pressed */
   dest.x += (src.w + adj_size(4));
   alphablit(icon, &src, ptheme, &dest, 255);
 
-  /* draw selected frame */
+  /* Draw selected frame */
   create_frame(ptheme,
                dest.x - 1, dest.y - 1, src.w + 1, src.h + 1,
                get_theme_color(COLOR_THEME_CUSTOM_WIDGET_SELECTED_FRAME));
-  /* draw press frame */
+  /* Draw press frame */
   create_frame(ptheme,
                dest.x - adj_size(2), dest.y - adj_size(2),
                src.w + adj_size(3), src.h + adj_size(3),
                get_theme_color(COLOR_THEME_CUSTOM_WIDGET_PRESSED_FRAME));
 
-  /* disabled */
+  /* Disabled */
   dest.x += (src.w + adj_size(4));
   alphablit(icon, &src, ptheme, &dest, 255);
   dest.w = src.w;
diff --git a/client/gui-sdl3/widget_label.c b/client/gui-sdl3/widget_label.c
index 9a2f65b6ae..a765ead0e0 100644
--- a/client/gui-sdl3/widget_label.c
+++ b/client/gui-sdl3/widget_label.c
@@ -264,7 +264,7 @@ struct widget *create_themelabel2(SDL_Surface *icon, struct gui_layer *pdest,
   label->size.w = MAX(label->size.w, w);
   label->size.h = MAX(label->size.h, h);
 
-  ptheme = create_surf(label->size.w, label->size.h * 2, SDL_SWSURFACE);
+  ptheme = create_surf(label->size.w, label->size.h * 2);
 
   colorkey = SDL_MapRGBA(ptheme->format, pstr->bgcol.r,
                          pstr->bgcol.g, pstr->bgcol.b, pstr->bgcol.a);
@@ -323,7 +323,7 @@ struct widget *convert_iconlabel_to_themeiconlabel2(struct widget *icon_label)
   Uint32 colorkey, flags = get_wflags(icon_label);
   SDL_Surface *pdest;
   SDL_Surface *ptheme = create_surf(icon_label->size.w,
-                                    icon_label->size.h * 2, SDL_SWSURFACE);
+                                    icon_label->size.h * 2);
 
   colorkey = SDL_MapRGBA(ptheme->format,
                          icon_label->string_utf8->bgcol.r,
diff --git a/client/gui-sdl3/widget_scrollbar.c b/client/gui-sdl3/widget_scrollbar.c
index 15be8df1b6..291ef7dc63 100644
--- a/client/gui-sdl3/widget_scrollbar.c
+++ b/client/gui-sdl3/widget_scrollbar.c
@@ -93,9 +93,9 @@ static SDL_Surface *create_vertical_surface(SDL_Surface *vert_theme,
   }
 
   if (!tile_count_midd) {
-    versurf = create_surf(vert_theme->w, tile_len_end * 2, SDL_SWSURFACE);
+    versurf = create_surf(vert_theme->w, tile_len_end * 2);
   } else {
-    versurf = create_surf(vert_theme->w, height, SDL_SWSURFACE);
+    versurf = create_surf(vert_theme->w, height);
   }
 
   src.x = 0;
@@ -225,9 +225,9 @@ static SDL_Surface *create_horizontal_surface(SDL_Surface *horiz_theme,
   }
 
   if (!tile_count_midd) {
-    horsurf = create_surf(tile_len_end * 2, horiz_theme->h, SDL_SWSURFACE);
+    horsurf = create_surf(tile_len_end * 2, horiz_theme->h);
   } else {
-    horsurf = create_surf(width, horiz_theme->h, SDL_SWSURFACE);
+    horsurf = create_surf(width, horiz_theme->h);
   }
 
   src.y = 0;
diff --git a/client/gui-sdl3/widget_window.c b/client/gui-sdl3/widget_window.c
index 4608e8a284..67f21ff2b4 100644
--- a/client/gui-sdl3/widget_window.c
+++ b/client/gui-sdl3/widget_window.c
@@ -266,8 +266,7 @@ bool resize_window(struct widget *pwindow, SDL_Surface *bcgd,
 
     FREESURFACE(pwindow->dst->surface);
     pwindow->dst->surface = create_surf(pwindow->size.w,
-                                        pwindow->size.h,
-                                        SDL_SWSURFACE);
+                                        pwindow->size.h);
   }
 
   if (bcgd != pwindow->theme) {
@@ -283,7 +282,7 @@ bool resize_window(struct widget *pwindow, SDL_Surface *bcgd,
       return FALSE;
     }
   } else {
-    pwindow->theme = create_surf(new_w, new_h, SDL_SWSURFACE);
+    pwindow->theme = create_surf(new_w, new_h);
 
     if (pcolor == NULL) {
       color = *get_theme_color(COLOR_THEME_BACKGROUND);
diff --git a/client/gui-sdl3/wldlg.c b/client/gui-sdl3/wldlg.c
index 1672e6b7b6..a09e50cb8c 100644
--- a/client/gui-sdl3/wldlg.c
+++ b/client/gui-sdl3/wldlg.c
@@ -1104,7 +1104,7 @@ void popup_worklist_editor(struct city *pcity, struct global_worklist *gwl)
 
   /* --------------- */
   /* Create Target Background Icon */
-  main_surf = create_surf(adj_size(116), adj_size(116), SDL_SWSURFACE);
+  main_surf = create_surf(adj_size(116), adj_size(116));
   SDL_FillSurfaceRect(main_surf, NULL, map_rgba(main_surf->format, bg_color));
 
   create_frame(main_surf,
-- 
2.45.2

