diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-29 03:30:33 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-29 03:30:33 +0000 |
commit | 83350f2fed074058f3f90095c2711196941c2eab (patch) | |
tree | 3ac706b28436858c87e1227f20843b02ebb82156 | |
parent | 34b3fd9f619b35f2583ca2ac97ee3d73cbe2b9ba (diff) | |
download | rockbox-83350f2fed074058f3f90095c2711196941c2eab.tar.gz rockbox-83350f2fed074058f3f90095c2711196941c2eab.zip |
fix divide-by-zero error in pictureflow when selecting album
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19876 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/pictureflow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index ca1f0715b3..2dbbb81d85 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c | |||
@@ -1180,8 +1180,8 @@ void render_slide(struct slide_data *slide, const int alpha) | |||
1180 | 1180 | ||
1181 | 1181 | ||
1182 | int distance = (h + slide->distance) * 100 / zoom; | 1182 | int distance = (h + slide->distance) * 100 / zoom; |
1183 | PFreal dist = distance * PFREAL_ONE; | ||
1184 | if (distance < 100 ) distance = 100; /* clamp distances */ | 1183 | if (distance < 100 ) distance = 100; /* clamp distances */ |
1184 | PFreal dist = distance * PFREAL_ONE; | ||
1185 | PFreal sdx = fcos(slide->angle); | 1185 | PFreal sdx = fcos(slide->angle); |
1186 | PFreal sdy = fsin(slide->angle); | 1186 | PFreal sdy = fsin(slide->angle); |
1187 | PFreal xs = slide->cx - sw * fdiv(sdx, dist) / 2; | 1187 | PFreal xs = slide->cx - sw * fdiv(sdx, dist) / 2; |