Skip to content

Commit

Permalink
Merge pull request #1634 from lem-project/fix-sdl-texture-error
Browse files Browse the repository at this point in the history
fix #1631 `SDL Error Texture dimensions are limited`
  • Loading branch information
cxxxr authored Nov 24, 2024
2 parents 02f8440 + 71bebc2 commit e814851
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontends/sdl2/display.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
:update-display
:display-width
:display-height
:display-window-width
:adapt-high-dpi-font-size
:change-font
:with-renderer
Expand Down
9 changes: 8 additions & 1 deletion frontends/sdl2/drawing.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,14 @@
(defun redraw-physical-line (display view x y objects height)
(loop :with current-x := x
:for object :in objects
:do (incf current-x (draw-object object current-x (+ y height) display view))))
:do (if (and (typep object 'text-object)
(< (display:display-window-width display)
(+ current-x (object-width object display))))
(loop :for c :across (text-object-string object)
:do (let ((object (lem-core::make-letter-object c (text-object-attribute object))))
(incf current-x (draw-object object current-x (+ y height) display view)))
:while (< current-x (display:display-window-width display)))
(incf current-x (draw-object object current-x (+ y height) display view)))))

(defun redraw-physical-line-from-behind (display view objects)
(loop :with current-x := (lem-if:view-width (lem-core:implementation) view)
Expand Down

0 comments on commit e814851

Please sign in to comment.