GIT
/
REPO
/
FRED-BOY
Projects
/
d2df-sdl.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfaf100
)
gl: background aspect fix are special case
author
DeaDDooMER <deaddoomer@deadsoftware.ru>
Wed, 20 Jul 2022 18:21:09 +0000
(21:21 +0300)
committer
DeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 9 Jun 2023 08:56:17 +0000
(11:56 +0300)
src/game/renders/opengl/r_render.pas
patch
|
blob
|
history
diff --git
a/src/game/renders/opengl/r_render.pas
b/src/game/renders/opengl/r_render.pas
index 850459600d965ab1a6ca4c7366c3aff2fbef1b6a..5c03ef31c16a70021d246e1dfcd88d2240e9d4e9 100644
(file)
--- a/
src/game/renders/opengl/r_render.pas
+++ b/
src/game/renders/opengl/r_render.pas
@@
-451,7
+451,7
@@
implementation
if img <> nil then
begin
img := BackgroundTexture.id;
-
fw := img.width * 4 div 3
; // fix aspect 4:3
+
if img.width = img.height then fw := img.width * 4 div 3 else fw := img.width
; // fix aspect 4:3
r_Common_CalcAspect(fw, img.height, gScreenWidth, gScreenHeight, false, w, h);
r_Draw_Texture(img, gScreenWidth div 2 - w div 2, 0, w, h, false, 255, 255, 255, 255, false);
end
DEADSOFTWARE 2012-2025