From d266c1b6116bb87e6b59cfe97a15fdb00a15eb64 Mon Sep 17 00:00:00 2001
From: Eric Petit <titer@videolan.org>
Date: Mon, 14 Oct 2002 20:09:17 +0000
Subject: [PATCH] Fixed seeking.

---
 modules/gui/beos/MediaControlView.cpp | 5 +++--
 modules/gui/beos/VlcWrapper.cpp       | 5 +++--
 modules/gui/beos/VlcWrapper.h         | 5 ++++-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/modules/gui/beos/MediaControlView.cpp b/modules/gui/beos/MediaControlView.cpp
index a7ad72662497..9202e51446cc 100644
--- a/modules/gui/beos/MediaControlView.cpp
+++ b/modules/gui/beos/MediaControlView.cpp
@@ -2,7 +2,7 @@
  * MediaControlView.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: MediaControlView.cpp,v 1.3 2002/09/30 18:30:27 titer Exp $
+ * $Id: MediaControlView.cpp,v 1.4 2002/10/14 20:09:17 titer Exp $
  *
  * Authors: Tony Castley <tony@castley.net>
  *          Stephan Aßmus <stippi@yellowbites.com>
@@ -82,7 +82,8 @@ MediaControlView::MediaControlView(BRect frame)
 	BRect frame(0.0, 0.0, 10.0, 10.0);
 	
     // Seek Slider
-    fSeekSlider = new SeekSlider(frame, "seek slider", this, 0, 2047);
+    fSeekSlider = new SeekSlider(frame, "seek slider", this,
+                                 0, SEEKSLIDER_RANGE - 1);
     fSeekSlider->SetValue(0);
     fSeekSlider->ResizeToPreferred();
     AddChild( fSeekSlider );
diff --git a/modules/gui/beos/VlcWrapper.cpp b/modules/gui/beos/VlcWrapper.cpp
index b0f9104f204a..2915a2bece23 100644
--- a/modules/gui/beos/VlcWrapper.cpp
+++ b/modules/gui/beos/VlcWrapper.cpp
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.cpp,v 1.5 2002/10/10 23:11:52 titer Exp $
+ * $Id: VlcWrapper.cpp,v 1.6 2002/10/14 20:09:17 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -658,7 +658,8 @@ void   Intf_VLCWrapper::setTimeAsFloat(float f_position)
     if( p_intf->p_sys->p_input != NULL )
     {
         input_Seek( p_intf->p_sys->p_input, 
-                   (long long int)(p_intf->p_sys->p_input->stream.p_selected_area->i_size * f_position / 100), 
+                   (long long int)(p_intf->p_sys->p_input->stream.p_selected_area->i_size
+                       * f_position / SEEKSLIDER_RANGE ), 
                    INPUT_SEEK_SET);
     }
 }
diff --git a/modules/gui/beos/VlcWrapper.h b/modules/gui/beos/VlcWrapper.h
index 64f34d3025e5..1ac65e9d6ff3 100644
--- a/modules/gui/beos/VlcWrapper.h
+++ b/modules/gui/beos/VlcWrapper.h
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.h,v 1.3 2002/10/10 23:11:52 titer Exp $
+ * $Id: VlcWrapper.h,v 1.4 2002/10/14 20:09:17 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -23,6 +23,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
+
+#define SEEKSLIDER_RANGE 2048
+
 class InterfaceWindow;
 class Intf_VLCWrapper;
 
-- 
GitLab