History

Revert "console.lua: fix the max log lines calculation"

This reverts commit 5e65999eb26b92bb10aa1ed2f88a633f77442e25. This was wrong because an empty line doesn't occupy as much height as a filled line. But update the comment so it is not unclear like before why 1.5 is subtracted.

Guido Cella committed 2 years ago

Commit 10789fa1 parent f476c021 file · +3 −3Browse files

Showing the changes to player/lua/console.lua (1 of 1 file). Show all

Unified · Split

player/lua/console.lua+3−3
@@ -278,9 +278,9 @@ local function calculate_max_log_lines() · 277 unmodified lines
278 return math.floor(select(2, get_scaled_osd_dimensions())278 return math.floor(select(2, get_scaled_osd_dimensions())
279 * (1 - global_margins.t - global_margins.b)279 * (1 - global_margins.t - global_margins.b)
280 / opts.font_size280 / opts.font_size
281 -- Subtract 1 for the input line and 1 for the newline281 -- Subtract 1 for the input line and 0.5 for the empty
282 -- between the log and the input line.282 -- line between the log and the input line.
283 - 2)283 - 1.5)
284end284end
285 285
286-- Takes a list of strings, a max width in characters and286-- Takes a list of strings, a max width in characters and

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t