Skip to content

Commit

Permalink
Merge pull request ddnet#9356 from Robyt3/Client-Console-Layout-Fixes
Browse files Browse the repository at this point in the history
Fix clipping of last console line, save background noise as RGBA
  • Loading branch information
def- authored Dec 6, 2024
2 parents 3fb0e14 + 41fee04 commit d270af9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified data/background_noise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/game/client/components/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ void CGameConsole::OnRender()
const float YScale = Graphics()->ScreenHeight() / Screen.h;
const float CalcOffsetY = LineHeight * std::floor((y - RowHeight) / LineHeight);
const float ClipStartY = (y - CalcOffsetY) * YScale;
Graphics()->ClipEnable(0, ClipStartY, Screen.w * XScale, y * YScale - ClipStartY);
Graphics()->ClipEnable(0, ClipStartY, Screen.w * XScale, (y + 2.0f) * YScale - ClipStartY);

while(pEntry)
{
Expand Down

0 comments on commit d270af9

Please sign in to comment.