mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
configure: detect __x_ABI_CWindows_CStorage_CIStorageFolder is defined
Older versions of mingw had only the simplified variants, but the official SDK doesn't use these so we should use the prefix ones. Do the same type of check for __x_ABI_CWindows_CStorage_CIApplicationData2 We require mingw 8+ to make UAP/UWP builds.
This commit is contained in:
parent
2532ecc760
commit
c0ff6f9807
30
configure.ac
30
configure.ac
@ -2589,10 +2589,34 @@ dnl
|
||||
AC_CHECK_HEADERS([dxgidebug.h dxgi1_6.h d3d11_4.h])
|
||||
|
||||
dnl
|
||||
dnl IApplicationData2
|
||||
dnl IStorageFolder
|
||||
dnl
|
||||
have_iapplication_data2="no"
|
||||
AC_CHECK_TYPES([IApplicationData2],[],[],[#include <windows.storage.h>])
|
||||
AS_IF([test "$vlc_winstore_app" = "1"],
|
||||
[
|
||||
AC_MSG_CHECKING([for proper __x_ABI_CWindows_CStorage_CIStorageFolder definition])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <windows.storage.h>
|
||||
__x_ABI_CWindows_CStorage_CIStorageFolder *toto;
|
||||
]])], [
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([IStorageFolder not properly defined, use mingw-w64 8.0.1 or higher])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([for proper __x_ABI_CWindows_CStorage_CIApplicationData2 definition])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <windows.storage.h>
|
||||
__x_ABI_CWindows_CStorage_CIApplicationData2 *toto;
|
||||
]])], [
|
||||
AC_MSG_RESULT([yes])
|
||||
have_iapplication_data2="yes"
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([HAVE_WINDOWS_STORAGE], [test "${have_iapplication_data2}" = "yes"])
|
||||
|
||||
dnl
|
||||
dnl DirectComposition
|
||||
|
@ -219,7 +219,7 @@ end_appdata:
|
||||
return psz_dir;
|
||||
}
|
||||
|
||||
#ifdef HAVE_IAPPLICATIONDATA2
|
||||
#ifdef HAVE___X_ABI_CWINDOWS_CSTORAGE_CIAPPLICATIONDATA2
|
||||
static char *config_GetCacheDir (void)
|
||||
{
|
||||
HRESULT hr;
|
||||
@ -281,7 +281,7 @@ end_appdata:
|
||||
|
||||
return GetFolderName(folder);
|
||||
}
|
||||
#endif // HAVE_IAPPLICATIONDATA2
|
||||
#endif // HAVE___X_ABI_CWINDOWS_CSTORAGE_CIAPPLICATIONDATA2
|
||||
|
||||
char *config_GetUserDir (vlc_userdir_t type)
|
||||
{
|
||||
@ -298,11 +298,11 @@ char *config_GetUserDir (vlc_userdir_t type)
|
||||
case VLC_USERDATA_DIR:
|
||||
return config_GetAppDir ();
|
||||
case VLC_CACHE_DIR:
|
||||
#ifdef HAVE_IAPPLICATIONDATA2
|
||||
#ifdef HAVE___X_ABI_CWINDOWS_CSTORAGE_CIAPPLICATIONDATA2
|
||||
return config_GetCacheDir ();
|
||||
#else // !HAVE_IAPPLICATIONDATA2
|
||||
#else // !HAVE___X_ABI_CWINDOWS_CSTORAGE_CIAPPLICATIONDATA2
|
||||
return config_GetAppDir();
|
||||
#endif // !HAVE_IAPPLICATIONDATA2
|
||||
#endif // !HAVE___X_ABI_CWINDOWS_CSTORAGE_CIAPPLICATIONDATA2
|
||||
case VLC_MUSIC_DIR:
|
||||
return config_GetShellDir (VLC_MUSIC_DIR);
|
||||
case VLC_PICTURES_DIR:
|
||||
|
Loading…
Reference in New Issue
Block a user