es_out_timeshift: explicitely use GetTempPathW
authorSteve Lhomme <robux4@ycbcr.xyz>
Wed, 17 May 2023 08:20:16 +0000 (10:20 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
The API is available in UWP builds. _wgetcwd() should work as well.

(cherry picked from commit d00ede66bf27211ca4a75975026f7f0ab312cab7) (edited)
edited:
- 3.0 already disabled the code in UWP differently

Gbp-Pq: Name 0106-es_out_timeshift-explicitely-use-GetTempPathW.patch

src/input/es_out_timeshift.c

index 71742083961306d9a86932954e19ebebdc1d769d..17c3e9fa9c305ae697f55eea1b45254cf7c9a2d6 100644 (file)
@@ -345,16 +345,16 @@ es_out_t *input_EsOutTimeshiftNew( input_thread_t *p_input, es_out_t *p_next_out
              (int)p_sys->i_tmp_size_max/(1024*1024) );
 
     p_sys->psz_tmp_path = var_InheritString( p_input, "input-timeshift-path" );
-#if defined (_WIN32) && !VLC_WINSTORE_APP
+#if defined (_WIN32)
     if( p_sys->psz_tmp_path == NULL )
     {
-        const DWORD count = GetTempPath( 0, NULL );
+        const DWORD count = GetTempPathW( 0, NULL );
         if( count > 0 )
         {
             TCHAR *path = vlc_alloc( count + 1, sizeof(TCHAR) );
             if( path != NULL )
             {
-                DWORD ret = GetTempPath( count + 1, path );
+                DWORD ret = GetTempPathW( count + 1, path );
                 if( ret != 0 && ret <= count )
                     p_sys->psz_tmp_path = FromT( path );
                 free( path );