Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1631 SDL Error Texture dimensions are limited #1634

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading