Add config entry "allowSymlinks"
This commit is contained in:
parent
dcdfea55f1
commit
10b3e04dee
|
@ -80,6 +80,7 @@ mkxp reads configuration data from the file "mkxp.conf" contained in the current
|
|||
| fixedFramerate | int | 0 | FPS will be fixed to this amount. Ignored if 0. |
|
||||
| solidFonts | bool | false | Don't use alpha blending for fonts |
|
||||
| gameFolder | string | "." | mkxp will look for all game related files here |
|
||||
| allowSymlinks | bool | false | Allow symlinks to be followed in the game folder. |
|
||||
| customScript | string | "" | Execute a raw ruby script file instead of an RPG Maker game. |
|
||||
| RTPs | string list | "" | A list of space separated paths to RTPs to be used (See next section) |
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ Config::Config()
|
|||
defScreenH(480),
|
||||
fixedFramerate(0),
|
||||
solidFonts(false),
|
||||
gameFolder(".")
|
||||
gameFolder("."),
|
||||
allowSymlinks(false)
|
||||
{}
|
||||
|
||||
void Config::read()
|
||||
|
@ -59,6 +60,7 @@ void Config::read()
|
|||
READ_VAL(fixedFramerate, Int);
|
||||
READ_VAL(solidFonts, Bool);
|
||||
READ_VAL(gameFolder, ByteArray);
|
||||
READ_VAL(allowSymlinks, Bool);
|
||||
READ_VAL(customScript, ByteArray);
|
||||
|
||||
QStringList _rtps = confFile.value("RTPs").toStringList();
|
||||
|
|
|
@ -45,6 +45,7 @@ struct Config
|
|||
bool solidFonts;
|
||||
|
||||
QByteArray gameFolder;
|
||||
bool allowSymlinks;
|
||||
|
||||
QByteArray customScript;
|
||||
QVector<QByteArray> rtps;
|
||||
|
|
|
@ -679,12 +679,16 @@ struct FileSystemPrivate
|
|||
}
|
||||
};
|
||||
|
||||
FileSystem::FileSystem(const char *argv0)
|
||||
FileSystem::FileSystem(const char *argv0,
|
||||
bool allowSymlinks)
|
||||
{
|
||||
p = new FileSystemPrivate;
|
||||
|
||||
PHYSFS_init(argv0);
|
||||
PHYSFS_registerArchiver(&RGSS_Archiver);
|
||||
|
||||
if (allowSymlinks)
|
||||
PHYSFS_permitSymbolicLinks(1);
|
||||
}
|
||||
|
||||
FileSystem::~FileSystem()
|
||||
|
|
|
@ -54,7 +54,8 @@ struct FileSystemPrivate;
|
|||
class FileSystem
|
||||
{
|
||||
public:
|
||||
FileSystem(const char *argv0);
|
||||
FileSystem(const char *argv0,
|
||||
bool allowSymlinks);
|
||||
~FileSystem();
|
||||
|
||||
void addPath(const char *path);
|
||||
|
|
|
@ -99,7 +99,7 @@ struct SharedStatePrivate
|
|||
SharedStatePrivate(RGSSThreadData *threadData)
|
||||
: bindingData(0),
|
||||
sdlWindow(threadData->window),
|
||||
fileSystem(threadData->argv0),
|
||||
fileSystem(threadData->argv0, threadData->config.allowSymlinks),
|
||||
eThread(*threadData->ethread),
|
||||
rtData(*threadData),
|
||||
config(threadData->config),
|
||||
|
|
Loading…
Reference in New Issue