Commit 693e48e9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

win32: use default timers back-end on WinRT (fixes #17417)

parent 436d383a
...@@ -358,8 +358,12 @@ libvlccore_la_SOURCES += \ ...@@ -358,8 +358,12 @@ libvlccore_la_SOURCES += \
win32/rand.c \ win32/rand.c \
win32/specific.c \ win32/specific.c \
win32/thread.c \ win32/thread.c \
win32/timer.c \
win32/winsock.c win32/winsock.c
if HAVE_WINSTORE
libvlccore_la_SOURCES += posix/timer.c
else
libvlccore_la_SOURCES += win32/timer.c
endif
else else
if HAVE_OS2 if HAVE_OS2
libvlccore_la_SOURCES += \ libvlccore_la_SOURCES += \
......
...@@ -57,10 +57,8 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data) ...@@ -57,10 +57,8 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data)
void vlc_timer_destroy (vlc_timer_t timer) void vlc_timer_destroy (vlc_timer_t timer)
{ {
#if !VLC_WINSTORE_APP
if (timer->handle != INVALID_HANDLE_VALUE) if (timer->handle != INVALID_HANDLE_VALUE)
DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE); DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE);
#endif
free (timer); free (timer);
} }
...@@ -69,9 +67,7 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute, ...@@ -69,9 +67,7 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
{ {
if (timer->handle != INVALID_HANDLE_VALUE) if (timer->handle != INVALID_HANDLE_VALUE)
{ {
#if !VLC_WINSTORE_APP
DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE); DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE);
#endif
timer->handle = INVALID_HANDLE_VALUE; timer->handle = INVALID_HANDLE_VALUE;
} }
if (value == 0) if (value == 0)
...@@ -86,10 +82,8 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute, ...@@ -86,10 +82,8 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
value = (value + 999) / 1000; value = (value + 999) / 1000;
interval = (interval + 999) / 1000; interval = (interval + 999) / 1000;
#if !VLC_WINSTORE_APP
if (!CreateTimerQueueTimer (&timer->handle, NULL, vlc_timer_do, timer, if (!CreateTimerQueueTimer (&timer->handle, NULL, vlc_timer_do, timer,
value, interval, WT_EXECUTEDEFAULT)) value, interval, WT_EXECUTEDEFAULT))
#endif
abort (); abort ();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment