mirror of
https://github.com/libretro/devilutionX.git
synced 2026-11-12 18:38:44 -10:00
Belated birthday present for @mewmew Functions for gettings paths have sensible names It's using snprintf for safe? string concat Paths don't use \ as path reporator, or magic marker Drop code for copying pre 1.09 save games from the windows folder
25 lines
426 B
C++
25 lines
426 B
C++
#include "diablo.h"
|
|
#include "../3rdParty/Storm/Source/storm.h"
|
|
|
|
DEVILUTION_BEGIN_NAMESPACE
|
|
|
|
BOOL ReadOnlyTest()
|
|
{
|
|
FILE *f;
|
|
char path[MAX_PATH], Filename[MAX_PATH];
|
|
|
|
GetPrefPath(path, MAX_PATH);
|
|
snprintf(Filename, DVL_MAX_PATH, "%sDiablo1ReadOnlyTest.foo", path);
|
|
|
|
f = fopen(Filename, "wt");
|
|
if (f) {
|
|
fclose(f);
|
|
remove(Filename);
|
|
return FALSE;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
DEVILUTION_END_NAMESPACE
|