diff gui/interface.c @ 36282:872298702c15

Increase precision of calculation by using constants of type double. Additionally: Rearrange calculation for clarity and add comments.
author ib
date Tue, 30 Jul 2013 13:07:43 +0000
parents 79519749ef4e
children d626e6b9fbc3
line wrap: on
line diff
--- a/gui/interface.c	Tue Jul 30 12:31:49 2013 +0000
+++ b/gui/interface.c	Tue Jul 30 13:07:43 2013 +0000
@@ -936,12 +936,12 @@
         break;
 
     case MPLAYER_SET_FONT_OUTLINE:
-        subtitle_font_thickness = (8.0f / 100.0f) * value;
+        subtitle_font_thickness = 8.0 * value / 100.0;   // transform 0..100 to 0..8
         mplayerLoadFont();
         break;
 
     case MPLAYER_SET_FONT_BLUR:
-        subtitle_font_radius = (8.0f / 100.0f) * value;
+        subtitle_font_radius = 8.0 * value / 100.0;      // transform 0..100 to 0..8
         mplayerLoadFont();
         break;