Subversion Repositories Games.Descent

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Windows Runtime (WinRT) support routines for PhysicsFS.
  3.  *
  4.  * Please see the file LICENSE.txt in the source's root directory.
  5.  *
  6.  *  This file originally written by Martin "T-Bone" Ahrnbom, but was mostly
  7.  *  merged into physfs_platform_windows.c by Ryan C. Gordon (so please harass
  8.  *  Ryan about bugs and not Martin).
  9.  */
  10.  
  11. /* (There used to be instructions on how to make a WinRT project, but at
  12.    this point, either CMake will do it for you or you should just drop
  13.    PhysicsFS's sources into your existing project. --ryan.) */
  14.  
  15. #define __PHYSICSFS_INTERNAL__
  16. #include "physfs_platforms.h"
  17.  
  18. #ifdef PHYSFS_PLATFORM_WINRT
  19.  
  20. #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
  21. #define _CRT_SECURE_NO_WARNINGS 1
  22. #endif
  23. #include <windows.h>
  24.  
  25. #include "physfs_internal.h"
  26.  
  27. const void *__PHYSFS_winrtCalcBaseDir(void)
  28. {
  29.     return Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();
  30. } /* __PHYSFS_winrtCalcBaseDir */
  31.  
  32. const void *__PHYSFS_winrtCalcPrefDir(void)
  33. {
  34.     return Windows::Storage::ApplicationData::Current->LocalFolder->Path->Data();
  35. } /* __PHYSFS_winrtCalcBaseDir */
  36.  
  37.  
  38. #endif /* PHYSFS_PLATFORM_WINRT */
  39.  
  40. /* end of physfs_platform_winrt.cpp ... */
  41.  
  42.