changeset 32970:3673c28ce811

Use double constants for higher precision calculations.
author ib
date Tue, 08 Mar 2011 18:53:54 +0000
parents ad1a232df994
children dc905c693b7a
files gui/mplayer/gui_common.c gui/mplayer/play.c
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/gui/mplayer/gui_common.c	Tue Mar 08 15:29:19 2011 +0000
+++ b/gui/mplayer/gui_common.c	Tue Mar 08 18:53:54 2011 +0000
@@ -412,22 +412,22 @@
 
         case itPotmeter:
             if (item->numphases == 1)
-                SimplePotmeterPutImage(&item->Bitmap, item->x, item->y, item->value / 100.0f);
+                SimplePotmeterPutImage(&item->Bitmap, item->x, item->y, item->value / 100.0);
             else
-                PutImage(&item->Bitmap, item->x, item->y, item->numphases, (item->numphases - 1) * (item->value / 100.0f));
+                PutImage(&item->Bitmap, item->x, item->y, item->numphases, (item->numphases - 1) * (item->value / 100.0));
             break;
 
         case itHPotmeter:
             if (item->numphases == 1)
-                SimplePotmeterPutImage(&item->Bitmap, item->x, item->y, item->value / 100.0f);
+                SimplePotmeterPutImage(&item->Bitmap, item->x, item->y, item->value / 100.0);
             else
-                PutImage(&item->Bitmap, item->x, item->y, item->numphases, (item->numphases - 1) * (item->value / 100.0f));
-            PutImage(&item->Mask, item->x + (item->width - item->pwidth) * (item->value / 100.0f), item->y, 3, ofs);
+                PutImage(&item->Bitmap, item->x, item->y, item->numphases, (item->numphases - 1) * (item->value / 100.0));
+            PutImage(&item->Mask, item->x + (item->width - item->pwidth) * (item->value / 100.0), item->y, 3, ofs);
             break;
 
         case itVPotmeter:
-            PutImage(&item->Bitmap, item->x, item->y, item->numphases, item->numphases * (1.0f - item->value / 100.0f));
-            PutImage(&item->Mask, item->x, item->y + (item->height - item->pheight) * (1.0f - item->value / 100.0f), 3, ofs);
+            PutImage(&item->Bitmap, item->x, item->y, item->numphases, item->numphases * (1.0 - item->value / 100.0));
+            PutImage(&item->Mask, item->x, item->y + (item->height - item->pheight) * (1.0 - item->value / 100.0), 3, ofs);
             break;
 
         case itSLabel:
--- a/gui/mplayer/play.c	Tue Mar 08 15:29:19 2011 +0000
+++ b/gui/mplayer/play.c	Tue Mar 08 18:53:54 2011 +0000
@@ -190,7 +190,7 @@
     if (guiIntfStruct.StreamType == STREAMTYPE_STREAM)
         return;
 
-    rel_seek_secs = 0.01f * s;   // 0.0..100.0
+    rel_seek_secs = s / 100.0;   // 0.0..100.0
     abs_seek_pos  = 3;
 }