MRI: Revise 'MKXP.data_directory' behavior

This function which was formerly a simple wrapper around
SLD_GetPrefPath() is changed to instead return the directory
assembled from org/app name specified in mkxp.conf, so one
can be sure that both mkxp and user scripts will always write
into the same directory when a custom path is preferred.
This commit is contained in:
Jonas Kulla 2014-10-22 04:16:15 +02:00
parent af8f3a36d2
commit ecf9b065c8
1 changed files with 1 additions and 11 deletions

View File

@ -193,17 +193,7 @@ RB_METHOD(mkxpDataDirectory)
{
RB_UNUSED_PARAM;
const char *org, *app;
rb_get_args(argc, argv, "zz", &org, &app RB_ARG_END);
char *path = SDL_GetPrefPath(org, app);
VALUE pathStr = rb_str_new_cstr(path);
SDL_free(path);
return pathStr;
return rb_str_new_cstr(shState->config().customDataPath.c_str());
}
RB_METHOD(mkxpPuts)