vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Tue Sep 20 
19:14:53 2016 +0300| [693e48e9beb40acf034232bd75097d921917826b] | committer: 
Rémi Denis-Courmont

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=693e48e9beb40acf034232bd75097d921917826b
---

 src/Makefile.am   | 6 +++++-
 src/win32/timer.c | 6 ------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index d612840..fd76170 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -358,8 +358,12 @@ libvlccore_la_SOURCES += \
        win32/rand.c \
        win32/specific.c \
        win32/thread.c \
-       win32/timer.c \
        win32/winsock.c
+if HAVE_WINSTORE
+libvlccore_la_SOURCES += posix/timer.c
+else
+libvlccore_la_SOURCES += win32/timer.c
+endif
 else
 if HAVE_OS2
 libvlccore_la_SOURCES += \
diff --git a/src/win32/timer.c b/src/win32/timer.c
index c57eff7..707e9f5 100644
--- a/src/win32/timer.c
+++ b/src/win32/timer.c
@@ -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)
 {
-#if !VLC_WINSTORE_APP
     if (timer->handle != INVALID_HANDLE_VALUE)
         DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE);
-#endif
     free (timer);
 }
 
@@ -69,9 +67,7 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
 {
     if (timer->handle != INVALID_HANDLE_VALUE)
     {
-#if !VLC_WINSTORE_APP
         DeleteTimerQueueTimer (NULL, timer->handle, INVALID_HANDLE_VALUE);
-#endif
         timer->handle = INVALID_HANDLE_VALUE;
     }
     if (value == 0)
@@ -86,10 +82,8 @@ void vlc_timer_schedule (vlc_timer_t timer, bool absolute,
     value = (value + 999) / 1000;
     interval = (interval + 999) / 1000;
 
-#if !VLC_WINSTORE_APP
     if (!CreateTimerQueueTimer (&timer->handle, NULL, vlc_timer_do, timer,
                                 value, interval, WT_EXECUTEDEFAULT))
-#endif
         abort ();
 }
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to