remove commonDataPath and update mkxp.json to match the actual behavior

This commit is contained in:
Struma 2022-07-04 11:18:22 -04:00
parent 183cea7046
commit 4b46d6e47d
5 changed files with 5 additions and 15 deletions

View file

@ -210,10 +210,9 @@
// Organisation / company and application / game // Organisation / company and application / game
// name to build the directory path where mkxp // name to build the directory path where mkxp
// will store game specific data (eg. key bindings). // will store game specific data (eg. key bindings).
// If not specified, mkxp will save to a common // If not specified, mkxp-z will use a folder based
// directory shared by all games. Note that these // on the name of the game, if possible, defaulting
// are TWO individual config entries, and both need // to "." for Org and "mkxp-z" for App otherwise.
// to be defined for this to take effect.
// (default: none) // (default: none)
// //
// "dataPathOrg": "mycompany", // "dataPathOrg": "mycompany",

View file

@ -352,8 +352,6 @@ void Config::readGameINI() {
customDataPath = prefPath(dataPathOrg.c_str(), dataPathApp.c_str()); customDataPath = prefPath(dataPathOrg.c_str(), dataPathApp.c_str());
commonDataPath = prefPath(".", "mkxp-z");
if (rgssVersion == 0) { if (rgssVersion == 0) {
/* Try to guess RGSS version based on Data/Scripts extension */ /* Try to guess RGSS version based on Data/Scripts extension */
rgssVersion = 1; rgssVersion = 1;

View file

@ -137,7 +137,6 @@ struct Config {
/* Internal */ /* Internal */
std::string customDataPath; std::string customDataPath;
std::string commonDataPath;
Config(); Config();

View file

@ -808,7 +808,7 @@ struct GraphicsPrivate {
ratio.x = (float)scRes.x / scSize.x * backingScaleFactor; ratio.x = (float)scRes.x / scSize.x * backingScaleFactor;
ratio.y = (float)scRes.y / scSize.y * backingScaleFactor; ratio.y = (float)scRes.y / scSize.y * backingScaleFactor;
rtData->screenOffset = scOffset; rtData->screenOffset = scOffset / backingScaleFactor;
} }
/* Enforces fixed aspect ratio, if desired */ /* Enforces fixed aspect ratio, if desired */

View file

@ -212,10 +212,7 @@ static bool writeBindings(const BDescVec &d, const std::string &dir,
void storeBindings(const BDescVec &d, const Config &conf) void storeBindings(const BDescVec &d, const Config &conf)
{ {
if (writeBindings(d, conf.customDataPath, conf.rgssVersion)) writeBindings(d, conf.customDataPath, conf.rgssVersion);
return;
writeBindings(d, conf.commonDataPath, conf.rgssVersion);
} }
#define READ(ptr, size, n, f) if (fread(ptr, size, n, f) < n) return false #define READ(ptr, size, n, f) if (fread(ptr, size, n, f) < n) return false
@ -312,8 +309,5 @@ BDescVec loadBindings(const Config &conf)
if (readBindings(d, conf.customDataPath, conf.rgssVersion)) if (readBindings(d, conf.customDataPath, conf.rgssVersion))
return d; return d;
if (readBindings(d, conf.commonDataPath, conf.rgssVersion))
return d;
return genDefaultBindings(conf); return genDefaultBindings(conf);
} }