|
Post by learn777 on Jun 15, 2021 2:52:49 GMT
This is how I normally capture my screenshots until I found out that the game I am playing has unused portion of the screen when using my cellphone. The game is using the whole screen when using LDPlayer:
elseif OBJ.type == "Screen Capture" then
if action == "click" or action == "longClick" or action == "dragDrop" or action == "swipe" then setImagePath(localImgPath .. appAlias .. "") local fn=os.date('%m%d%y%H%M%S') local reg = Region(0, 0, getRealScreenSize():getX(), getRealScreenSize():getY()) local shotInterval = customShotInt or OBJ.shot_interval local timer = Timer() for i = 1, OBJ.shot_times do reg:save(tostring(appAlias .. "_" .. "img_" .. fn .. "-" .. i ..".png")) if not is_timeout(timer, shotInterval) then wait(shotInterval - timer:set()) end end setImagePath(localPath.. appAlias .. "img") toast("Image Captured!!!") break end How do I include setGameArea in this script in such a way that it will capture only the respective game area when in LDPlayer and when in mobile device. Does setGameArea override getRealScreenSize()? I have been adding random values when creating scripts to compensate with the game area difference only to find out later that it still not working in mobile. Thanks in advance.
|
|
|
Post by AnkuLua on Jun 15, 2021 3:25:32 GMT
setGameArea doesn't affect getRealScreenSize()
Which game did you play?
We found out that most games scale on the short edges. That is, it's height on landscape and width on portrait.
|
|
|
Post by learn777 on Jun 15, 2021 6:15:25 GMT
Darkness Rises. It has about 13 pixels unused screen on top and bottom of the screen when played in my mobile device. For ease, I create scripts using LDPlayer which doesn't have that "margin" and it caused some of parts of the script not to work on mobile.
|
|