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

View file

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

View file

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

View file

@ -808,7 +808,7 @@ struct GraphicsPrivate {
ratio.x = (float)scRes.x / scSize.x * backingScaleFactor;
ratio.y = (float)scRes.y / scSize.y * backingScaleFactor;
rtData->screenOffset = scOffset;
rtData->screenOffset = scOffset / backingScaleFactor;
}
/* 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)
{
if (writeBindings(d, conf.customDataPath, conf.rgssVersion))
return;
writeBindings(d, conf.commonDataPath, conf.rgssVersion);
writeBindings(d, conf.customDataPath, conf.rgssVersion);
}
#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))
return d;
if (readBindings(d, conf.commonDataPath, conf.rgssVersion))
return d;
return genDefaultBindings(conf);
}