diff --git a/ffi/framebuffer_linux.lua b/ffi/framebuffer_linux.lua index 5b909d44d..dcb489e33 100644 --- a/ffi/framebuffer_linux.lua +++ b/ffi/framebuffer_linux.lua @@ -201,7 +201,7 @@ end function framebuffer:setHWRotation(mode) local vinfo = self._vinfo - vinfo.rotate = self.forced_rotation[mode+1] or mode + vinfo.rotate = self.forced_rotation and self.forced_rotation[mode+1] or mode assert(C.ioctl(self.fd, C.FBIOPUT_VSCREENINFO, vinfo) == 0, "cannot set variable screen info") end