From ecf9b065c8dd08686294e448bf35fd74f0345a73 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Wed, 22 Oct 2014 04:16:15 +0200 Subject: [PATCH] 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. --- binding-mri/binding-mri.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp index 39cc2b6..8dfdae4 100644 --- a/binding-mri/binding-mri.cpp +++ b/binding-mri/binding-mri.cpp @@ -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)