From: Steve Lhomme Date: Wed, 17 May 2023 08:20:16 +0000 (+0200) Subject: es_out_timeshift: explicitely use GetTempPathW X-Git-Tag: archive/raspbian/3.0.21-7+rpi1^2~20 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=44f46a0002c0680cd34e25dda9f67d34c407d96d;p=vlc.git es_out_timeshift: explicitely use GetTempPathW 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 --- diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c index 71742083..17c3e9fa 100644 --- a/src/input/es_out_timeshift.c +++ b/src/input/es_out_timeshift.c @@ -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 );