/
physfs_platform_winrt.cpp
41 lines (29 loc) · 1.2 KB
/
physfs_platform_winrt.cpp
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
38
39
40
/*
* Windows Runtime (WinRT) support routines for PhysicsFS.
*
* Please see the file LICENSE.txt in the source's root directory.
*
* This file originally written by Martin "T-Bone" Ahrnbom, but was mostly
* merged into physfs_platform_windows.c by Ryan C. Gordon (so please harass
* Ryan about bugs and not Martin).
*/
/* (There used to be instructions on how to make a WinRT project, but at
this point, either CMake will do it for you or you should just drop
PhysicsFS's sources into your existing project. --ryan.) */
#define __PHYSICSFS_INTERNAL__
#include "physfs_platforms.h"
#ifdef PHYSFS_PLATFORM_WINRT
#include "physfs_internal.h"
/* !!! FIXME: maybe clean out the "allocator" macro, eventually. */
#undef allocator /* apparently Windows 10 SDK conflicts here. */
#include <windows.h>
const void *__PHYSFS_winrtCalcBaseDir(void)
{
return Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();
} /* __PHYSFS_winrtCalcBaseDir */
const void *__PHYSFS_winrtCalcPrefDir(void)
{
return Windows::Storage::ApplicationData::Current->LocalFolder->Path->Data();
} /* __PHYSFS_winrtCalcBaseDir */
#endif /* PHYSFS_PLATFORM_WINRT */
/* end of physfs_platform_winrt.cpp ... */