From dcc0c8bc95e72c9a7195218ca9fcd4c2fd9c4ed9 Mon Sep 17 00:00:00 2001 From: AShiningRay Date: Sun, 13 Oct 2024 20:09:03 -0300 Subject: [PATCH] PlatformGraphics: Don't follow J2ME-Loader on drawLine() We don't need those size checks, in fact, it introduced a small regression where every line had a break on at least one of its points. --- src/org/recompile/mobile/PlatformGraphics.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/org/recompile/mobile/PlatformGraphics.java b/src/org/recompile/mobile/PlatformGraphics.java index e18f79e0..bd61addb 100644 --- a/src/org/recompile/mobile/PlatformGraphics.java +++ b/src/org/recompile/mobile/PlatformGraphics.java @@ -221,16 +221,7 @@ public void drawRGB(int[] rgbData, int offset, int scanlength, int x, int y, int } - public void drawLine(int x1, int y1, int x2, int y2) - { - if (x2 >= x1) { x2++; } - else { x1++; } - - if (y2 >= y1) { y2++; } - else { y1++; } - - gc.drawLine(x1, y1, x2, y2); - } + public void drawLine(int x1, int y1, int x2, int y2) { gc.drawLine(x1, y1, x2, y2); } public void drawRect(int x, int y, int width, int height) {