From 62b0456a4b1415d3e4138e8dbca4b22f88d374d6 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Tue, 23 Jul 2024 06:05:45 -0400 Subject: puzzles: resync with upstream (adds new Palisade cursor interface). Resyncs properly with this slightly modified upstream: https://www.franklinwei.com/git/puzzles/commit/?h=rockbox-devel&id=1c62dac3f4f1a819a394ff33cc82912cf9079b50 Change-Id: I2018e81647c22010f9d74d8d14d13982f2969a8f --- apps/plugins/puzzles/src/signpost.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/plugins/puzzles/src/signpost.c') diff --git a/apps/plugins/puzzles/src/signpost.c b/apps/plugins/puzzles/src/signpost.c index 9aed67bb4a..4d2f5849fd 100644 --- a/apps/plugins/puzzles/src/signpost.c +++ b/apps/plugins/puzzles/src/signpost.c @@ -1895,8 +1895,9 @@ static void draw_star(drawing *dr, int cx, int cy, int rad, int npoints, coords = snewn(npoints * 2 * 2, int); for (n = 0; n < npoints * 2; n++) { - a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset; - r = (n % 2) ? (double)rad/2.0 : (double)rad; + /* hack to accomodate rockbox's concave polygon drawing */ + a = 2.0 * PI * ((double)n / ((double)npoints * 2.0)) + angle_offset - PI / npoints; + r = (n % 2 == 0) ? (double)rad/2.0 : (double)rad; /* We're rotating the point at (0, -r) by a degrees */ coords[2*n+0] = cx + (int)( r * sin(a)); -- cgit v1.2.3