1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Wed, 17 May 2023 10:20:16 +0200
Subject: 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
---
src/input/es_out_timeshift.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index 7174208..17c3e9f 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 );
|