From ea8e6008003403f784b7d85041d3e3520b2b1a48 Mon Sep 17 00:00:00 2001 From: gamax92 Date: Fri, 19 Jun 2015 21:03:02 -0600 Subject: [PATCH] Add a few TODO's That's it for today --- src/component/screen_sdl2.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/component/screen_sdl2.lua b/src/component/screen_sdl2.lua index 742aa7e..a51e075 100644 --- a/src/component/screen_sdl2.lua +++ b/src/component/screen_sdl2.lua @@ -106,6 +106,7 @@ SDL.renderFillRect(renderer, ffi.C.NULL) SDL.setRenderTarget(renderer, ffi.C.NULL); function elsa.draw() + -- TODO: This causes issues in linux, test if it's necessary in windows or not SDL.showWindow(window) SDL.renderCopy(renderer, texture, ffi.C.NULL, ffi.C.NULL) SDL.renderPresent(renderer) @@ -330,14 +331,15 @@ end function cec.copy(x1, y1, w, h, tx, ty) -- Copies a portion of the screen from the specified location with the specified size by the specified translation. --TODO cprint("(cec) screen.copy", x1, y1, w, h, tx, ty) + -- TODO: copy has issues with wide characters x1,y1,w,h,tx,ty=math.trunc(x1),math.trunc(y1),math.trunc(w),math.trunc(h),math.trunc(tx),math.trunc(ty) - if w <= 0 or h <= 0 then + if w <= 0 or h <= 0 or (tx == 0 and ty == 0) then return true end local x2 = x1+w-1 local y2 = y1+h-1 - -- Not dealing with offscreen stuff yet - if x1 < 1 or y1 < 1 or x2 > width or y2 > height or (tx == 0 and ty == 0) then + -- TODO: Not dealing with offscreen stuff yet + if x1 < 1 or y1 < 1 or x2 > width or y2 > height then return true end local copy = {txt={},fg={},bg={},fgp={},bgp={}}