[vlc-commits] modules: convert "mouse-hide-timeout" in ms to ticks using VLC_TICK macros
Steve Lhomme
git at videolan.org
Tue Jul 3 11:24:10 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul 3 11:18:22 2018 +0200| [12c98553c7d9b9600ca7c883cb93da4040c87acf] | committer: Steve Lhomme
modules: convert "mouse-hide-timeout" in ms to ticks using VLC_TICK macros
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=12c98553c7d9b9600ca7c883cb93da4040c87acf
---
modules/video_filter/magnify.c | 4 ++--
modules/video_output/caca.c | 3 +--
modules/video_output/wayland/input.c | 3 +--
modules/video_output/xcb/window.c | 3 +--
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/modules/video_filter/magnify.c b/modules/video_filter/magnify.c
index ce0e2a9446..9a2cf876a7 100644
--- a/modules/video_filter/magnify.c
+++ b/modules/video_filter/magnify.c
@@ -73,7 +73,7 @@ typedef struct
{
image_handler_t *p_image;
- int64_t i_hide_timeout;
+ vlc_tick_t i_hide_timeout;
int i_zoom; /* zoom level in percent */
int i_x, i_y; /* top left corner coordinates in original image */
@@ -127,7 +127,7 @@ static int Create( vlc_object_t *p_this )
p_sys->i_zoom = 2*ZOOM_FACTOR;
p_sys->b_visible = true;
p_sys->i_last_activity = vlc_tick_now();
- p_sys->i_hide_timeout = 1000 * var_InheritInteger( p_filter, "mouse-hide-timeout" );
+ p_sys->i_hide_timeout = VLC_TICK_FROM_MS( var_InheritInteger( p_filter, "mouse-hide-timeout" ) );
/* */
p_filter->pf_video_filter = Filter;
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 59267fd897..cd55041c7d 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -470,8 +470,7 @@ static int Open(vlc_object_t *object)
}
}
- sys->cursor_timeout = var_InheritInteger(vd, "mouse-hide-timeout")
- * (CLOCK_FREQ / 1000);
+ sys->cursor_timeout = VLC_TICK_FROM_MS( var_InheritInteger(vd, "mouse-hide-timeout") );
sys->cursor_deadline = INT64_MAX;
/* Fix format */
diff --git a/modules/video_output/wayland/input.c b/modules/video_output/wayland/input.c
index d81b1d3f05..58d1481bd1 100644
--- a/modules/video_output/wayland/input.c
+++ b/modules/video_output/wayland/input.c
@@ -217,8 +217,7 @@ static void pointer_create(struct seat_data *sd)
if (likely(sd->pointer != NULL))
wl_pointer_add_listener(sd->pointer, &pointer_cbs, sd);
- sd->cursor_timeout = var_InheritInteger(sd->owner, "mouse-hide-timeout")
- * (CLOCK_FREQ / 1000);
+ sd->cursor_timeout = VLC_TICK_FROM_MS( var_InheritInteger(sd->owner, "mouse-hide-timeout") );
sd->cursor_deadline = INT64_MAX;
}
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 7bd001793a..79c256a054 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -315,8 +315,7 @@ static void *Thread (void *data)
.events = POLLIN,
};
xcb_cursor_t cursor = CursorCreate(conn, p_sys->root); /* blank cursor */
- vlc_tick_t lifetime = var_InheritInteger(wnd, "mouse-hide-timeout")
- * (CLOCK_FREQ / 1000);
+ vlc_tick_t lifetime = VLC_TICK_FROM_MS( var_InheritInteger(wnd, "mouse-hide-timeout") );
vlc_tick_t deadline = INT64_MAX;
if (ufd.fd == -1)
More information about the vlc-commits
mailing list