Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 35cb096

Browse files
committed
freej2me-lr: Fix rotated pointer coordinates.
Before, when the screen was rotated on the libretro frontend, the pointer coordinates in the java file were reversed correctly, but some extra calculations to account for the 90 degrees counterclockwise rotation were not done, making the pointer be "reversed" in the y axis, so the lower the pointer was in the screen, the higher the y value it had in the rotated mode. Now it works as intended.
1 parent 3ee6a3c commit 35cb096

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/org/recompile/freej2me/Libretro.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void run()
185185
}
186186
else
187187
{
188-
Mobile.getPlatform().pointerReleased(mousey, mousex);
188+
Mobile.getPlatform().pointerReleased(-mousey+lcdWidth, mousex);
189189
}
190190
break;
191191

@@ -198,7 +198,7 @@ public void run()
198198
}
199199
else
200200
{
201-
Mobile.getPlatform().pointerPressed(mousey, mousex);
201+
Mobile.getPlatform().pointerPressed(-mousey+lcdWidth, mousex);
202202
}
203203
break;
204204

@@ -211,7 +211,7 @@ public void run()
211211
}
212212
else
213213
{
214-
Mobile.getPlatform().pointerDragged(mousey, mousex);
214+
Mobile.getPlatform().pointerDragged(-mousey+lcdWidth, mousex);
215215
}
216216
break;
217217

0 commit comments

Comments
 (0)