From 1e039a1c7960acd22b429d66c151d8b99524a8e3 Mon Sep 17 00:00:00 2001 From: ANSI TV Admin Date: Wed, 11 Nov 2026 15:59:34 -0800 Subject: [PATCH 21/24] Exclusive border: in fullscreen the frame runs round the screen's edges Windowed, the frame still wraps the picture. Fullscreen, it is drawn at the edges of the screen instead of round the letterboxed picture; the picture's size and place are unchanged (it shrinks only when the letterbox is narrower than the frame, as before). --- src/conio/sdl_con.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/conio/sdl_con.c b/src/conio/sdl_con.c index 06df9a39..c188dd48 100644 --- a/src/conio/sdl_con.c +++ b/src/conio/sdl_con.c @@ -1038,10 +1038,22 @@ sdl_draw_xborder(int winw, int winh, int pw, int ph) if (b <= 0 || renderer == NULL || sdl.SetRenderDrawColor == NULL || sdl.GetRenderDrawColor == NULL || sdl.RenderFillRects == NULL) return; - x = (winw - pw) / 2 - b; - y = (winh - ph) / 2 - b; - w = pw + 2 * b; - h = ph + 2 * b; + if (fullscreen) { + /* Fullscreen: the frame runs round the screen's edges, not + * round the picture -- the picture keeps its place and size + * (sdl_picture_size leaves it room when the letterbox is + * narrower than the frame). */ + x = 0; + y = 0; + w = winw; + h = winh; + } + else { + x = (winw - pw) / 2 - b; + y = (winh - ph) / 2 - b; + w = pw + 2 * b; + h = ph + 2 * b; + } if (x < 0) { w += x; x = 0; -- 2.47.3