src/physfs_platform_winrt.cpp
author Ryan C. Gordon <icculus@icculus.org>
Sun, 17 May 2020 01:41:52 -0400
changeset 1691 c66c9326b05d
parent 1590 5aa450209e6a
permissions -rw-r--r--
7z: Make error handling a little more robust.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
     1
/*
1518
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     2
 * Windows Runtime (WinRT) support routines for PhysicsFS.
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     3
 *
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     4
 * Please see the file LICENSE.txt in the source's root directory.
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     5
 *
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     6
 *  This file originally written by Martin "T-Bone" Ahrnbom, but was mostly
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     7
 *  merged into physfs_platform_windows.c by Ryan C. Gordon (so please harass
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     8
 *  Ryan about bugs and not Martin).
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
     9
 */
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    10
1518
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    11
/* (There used to be instructions on how to make a WinRT project, but at
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    12
   this point, either CMake will do it for you or you should just drop
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    13
   PhysicsFS's sources into your existing project. --ryan.) */
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    14
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    15
#define __PHYSICSFS_INTERNAL__
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    16
#include "physfs_platforms.h"
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    17
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    18
#ifdef PHYSFS_PLATFORM_WINRT
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    19
1590
5aa450209e6a windows: Disable _CRT_SECURE_NO_WARNINGS again.
Ryan C. Gordon <icculus@icculus.org>
parents: 1589
diff changeset
    20
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
5aa450209e6a windows: Disable _CRT_SECURE_NO_WARNINGS again.
Ryan C. Gordon <icculus@icculus.org>
parents: 1589
diff changeset
    21
#define _CRT_SECURE_NO_WARNINGS 1
5aa450209e6a windows: Disable _CRT_SECURE_NO_WARNINGS again.
Ryan C. Gordon <icculus@icculus.org>
parents: 1589
diff changeset
    22
#endif
1589
e4f75163b60d Cleaned up some header inclusion politics.
Ryan C. Gordon <icculus@icculus.org>
parents: 1518
diff changeset
    23
#include <windows.h>
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    24
1589
e4f75163b60d Cleaned up some header inclusion politics.
Ryan C. Gordon <icculus@icculus.org>
parents: 1518
diff changeset
    25
#include "physfs_internal.h"
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    26
1518
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    27
const void *__PHYSFS_winrtCalcBaseDir(void)
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    28
{
1518
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    29
    return Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data();
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    30
} /* __PHYSFS_winrtCalcBaseDir */
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    31
1518
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    32
const void *__PHYSFS_winrtCalcPrefDir(void)
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    33
{
1518
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    34
    return Windows::Storage::ApplicationData::Current->LocalFolder->Path->Data();
a6ac19814d53 Serious cleanup and update of Windows RT support.
Ryan C. Gordon <icculus@icculus.org>
parents: 1511
diff changeset
    35
} /* __PHYSFS_winrtCalcBaseDir */
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    36
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    37
1442
3cf4fbec7b54 Removed __PHYSFS_platformSetDefaultAllocator(); nothing uses it now.
Ryan C. Gordon <icculus@icculus.org>
parents: 1402
diff changeset
    38
#endif /* PHYSFS_PLATFORM_WINRT */
1359
e06676e2c6b4 dos2unix'd platform_winrt.cpp
Ryan C. Gordon <icculus@icculus.org>
parents: 1356
diff changeset
    39
1507
8953b8a171e7 Update filename comments.
Ryan C. Gordon <icculus@icculus.org>
parents: 1506
diff changeset
    40
/* end of physfs_platform_winrt.cpp ... */
8953b8a171e7 Update filename comments.
Ryan C. Gordon <icculus@icculus.org>
parents: 1506
diff changeset
    41