Skip to content

Commit

Permalink
SDL2: don't reset alpha component for subwindow background color in i…
Browse files Browse the repository at this point in the history
…nit_colors(); resolves PowerWyrm's bug report here, http://angband.oook.cz/forum/showpost.php?p=157590&postcount=180
  • Loading branch information
backwardsEric authored and NickMcConnell committed Feb 21, 2022
1 parent a6bf631 commit 6e1871e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main-sdl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5530,7 +5530,13 @@ static void init_colors(void)
g_windows[i].color = g_colors[DEFAULT_WINDOW_BG_COLOR];
}
for (i = 0; i < N_ELEMENTS(g_subwindows); i++) {
g_subwindows[i].color = g_colors[DEFAULT_SUBWINDOW_BG_COLOR];
/* Retain whatever customized alpha the subwindow has. */
g_subwindows[i].color.r =
g_colors[DEFAULT_SUBWINDOW_BG_COLOR].r;
g_subwindows[i].color.g =
g_colors[DEFAULT_SUBWINDOW_BG_COLOR].g;
g_subwindows[i].color.b =
g_colors[DEFAULT_SUBWINDOW_BG_COLOR].b;
}
}

Expand Down

0 comments on commit 6e1871e

Please sign in to comment.