]> git.sesse.net Git - vlc/commitdiff
Updating slider status uses no longer FPU calculations when compiled for strongarm1100.
authorJean-Paul Saman <jpsaman@videolan.org>
Sat, 4 Jan 2003 00:21:00 +0000 (00:21 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Sat, 4 Jan 2003 00:21:00 +0000 (00:21 +0000)
configure.ac.in
modules/gui/familiar/familiar.c
modules/gui/familiar/familiar.h

index 9cfb42a6462bb7d9e1a5ef159bc1b56ffaa16a88..2c701d59b9a9eeae7de9fccc045e22bff6d2450e 100644 (file)
@@ -855,6 +855,10 @@ AC_ARG_WITH(tuning,
 if test "x${with_tuning}" != "x"; then
     if test "x${target_cpu}" = "xpowerpc"; then
         CFLAGS_TUNING="-mtune=${with_tuning}"
+    elif test "x${target_cpu}" = "xstrongarm1100"; then
+        CFLAGS_TUNING="-mtune=${with_tuning}"
+           AC_DEFINE(HAVE_STRONGARM, 1, Define if have a strongarm cpu, because then we should not do FPU calculations
+ due to lack of FPU hardware support. Otherwise it would be *slow*)
     else
         CFLAGS_TUNING="-mcpu=${with_tuning}"
     fi
index f91dd1e3bca5d353121aa4a345268dcc33f7cf7b..09c0fd841fb935b3d25723c2d231dbc51eca3ea1 100644 (file)
@@ -2,7 +2,7 @@
  * familiar.c : familiar plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: familiar.c,v 1.22 2003/01/03 20:55:00 jpsaman Exp $
+ * $Id: familiar.c,v 1.23 2003/01/04 00:21:00 jpsaman Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -325,7 +325,11 @@ static int Manage( intf_thread_t *p_intf )
             /* Manage the slider */
             if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
             {
+#ifndef HAVE_STRONGARM
                 float newvalue = p_intf->p_sys->p_adj->value;
+#else
+                off_t newvalue = p_intf->p_sys->p_adj->value;
+#endif
 
 #define p_area p_input->stream.p_selected_area
                 /* If the user hasn't touched the slider since the last time,
@@ -335,8 +339,11 @@ static int Manage( intf_thread_t *p_intf )
                     /* Update the value */
                     p_intf->p_sys->p_adj->value =
                     p_intf->p_sys->f_adj_oldvalue =
+#ifndef HAVE_STRONGARM
                         ( 100. * p_area->i_tell ) / p_area->i_size;
-
+#else
+                                               ( 100 * p_area->i_tell ) / p_area->i_size;                                              
+#endif
                     gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
                                              "value_changed" );
                 }
index 0498179cf272a2bf77c32e738694f15dbf4e7b98..a22ec07089a6c9efc1afe4b9581cb9ca3da1ca93 100644 (file)
@@ -2,7 +2,7 @@
  * familiar.h: private Gtk+ interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: familiar.h,v 1.10 2003/01/03 20:55:01 jpsaman Exp $
+ * $Id: familiar.h,v 1.11 2003/01/04 00:21:00 jpsaman Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -40,8 +40,11 @@ struct intf_sys_t
     /* slider */
     GtkLabel *          p_slider_label;
     GtkAdjustment *     p_adj;                   /* slider adjustment object */
+#ifdef HAVE_STRONGARM
+    off_t               f_adj_oldvalue;
+#else
     float               f_adj_oldvalue;                    /* previous value */
-
+#endif
     /* special actions */
     vlc_bool_t          b_playing;
     vlc_bool_t          b_window_changed;        /* window display toggled ? */