~technomancy/polywell

34881b8a0e452d4a2e1144493778c6695e404850 — Phil Hagelberg 6 months ago eca90c5 master
Fix initial dimensions when launching in fullscreen.
1 files changed, 4 insertions(+), 1 deletions(-)

M polywell/frontend/love.lua
M polywell/frontend/love.lua => polywell/frontend/love.lua +4 -1
@@ 13,6 13,9 @@ local exists = love.filesystem.getInfo or love.filesystem.exists -- 0.10.x
local reset_canvas = function()
   love.graphics.setCanvas()
   local rw, rh = love.graphics.getDimensions()
   if(exists("fullscreen")) then
      rw, rh = love.window.getDesktopDimensions()
   end
   if fixed_w and fixed_h then
      w, h = fixed_w, fixed_h
      scale = math.floor(math.min(rw/w,rh/h))


@@ 58,7 61,7 @@ end

local render_buffer = function(b, colors, bh, focused)
   local display_rows = math.floor(bh / row_height)
   offset = scroll_offset(offset, b.point_line, display_rows)
   offset = scroll_offset(math.floor(offset), b.point_line, display_rows)
   if(focused or not scroll_rows) then scroll_rows = display_rows end
   for i,line in ipairs(b.render_lines or b.lines) do
      if(i >= offset) then