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.
Showing the changes to player/lua/console.lua (1 of 1 file). Show all
Unified · Split
| @@ -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_size | 280 | / opts.font_size |
| 281 | -- Subtract 1 for the input line and 1 for the newline | 281 | -- 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) |
| 284 | end | 284 | end |
| 285 | 285 | ||
| 286 | -- Takes a list of strings, a max width in characters and | 286 | -- Takes a list of strings, a max width in characters and |