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:
parent
af8f3a36d2
commit
ecf9b065c8
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue