Updating slider status uses no longer FPU calculations when compiled for strongarm1100.

This commit is contained in:
Jean-Paul Saman 2003-01-04 00:21:00 +00:00
parent dafc259dbe
commit 6d969890bd
3 changed files with 18 additions and 4 deletions

View 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

View 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" );
}

View 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 ? */