Index: apps/gui/gwps-common.c =================================================================== --- apps/gui/gwps-common.c (Revision 19114) +++ apps/gui/gwps-common.c (Arbeitskopie) @@ -1391,7 +1391,7 @@ case WPS_TOKEN_BUTTON_VOLUME: if (data->button_time_volume && TIME_BEFORE(current_tick, data->button_time_volume + - token->value.i)) + token->value.i * TIMEOUT_UNIT)) return "v"; return NULL; default: @@ -1728,7 +1728,7 @@ new_subline_refresh = true; data->lines[line].subline_expire_time = (reset_subline ? current_tick : data->lines[line].subline_expire_time) + - BASE_SUBLINE_TIME*data->sublines[subline_idx].time_mult; + TIMEOUT_UNIT*data->sublines[subline_idx].time_mult; break; } } Index: apps/gui/gwps.h =================================================================== --- apps/gui/gwps.h (Revision 19114) +++ apps/gui/gwps.h (Arbeitskopie) @@ -121,9 +121,14 @@ #endif -#define DEFAULT_SUBLINE_TIME_MULTIPLIER 20 /* (10ths of sec) */ -#define BASE_SUBLINE_TIME 10 /* base time that multiplier is applied to - (1/HZ sec, or 100ths of sec) */ +/* Timeout unit expressed in HZ. In WPS, all timeouts are given in seconds + (possibly with a decimal fraction) but stored as integer values. + E.g. 2.5 is stored as 25. This means 25 tenth of a second, i.e. 25 units. +*/ +#define TIMEOUT_UNIT 10 /* I.e. 0.1 sec */ + +#define DEFAULT_SUBLINE_TIME_MULTIPLIER 20 /* In TIMEOUT_UNIT's */ + #define SUBLINE_RESET -1 enum wps_parse_error { Index: apps/gui/wps_parser.c =================================================================== --- apps/gui/wps_parser.c (Revision 19114) +++ apps/gui/wps_parser.c (Arbeitskopie) @@ -26,7 +26,6 @@ #include "file.h" #include "misc.h" #include "plugin.h" -#include "kernel.h" #ifdef __PCTOOL__ #ifdef WPSEDITOR @@ -811,7 +810,7 @@ case WPS_TOKEN_SUBLINE_TIMEOUT: return -1; case WPS_TOKEN_BUTTON_VOLUME: - val = HZ; + val = 10; break; } }