mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Added setting to change the directory screenshots are stored in
This commit is contained in:
parent
7ade0cb2c3
commit
2b54e6216b
4 changed files with 19 additions and 2 deletions
|
@ -657,7 +657,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialise and enter main loop.
|
// Initialise and enter main loop.
|
||||||
|
|
||||||
void OMW::Engine::go()
|
void OMW::Engine::go()
|
||||||
{
|
{
|
||||||
assert (!mContentFiles.empty());
|
assert (!mContentFiles.empty());
|
||||||
|
@ -686,7 +685,8 @@ void OMW::Engine::go()
|
||||||
mViewer->setUseConfigureAffinity(false);
|
mViewer->setUseConfigureAffinity(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mScreenCaptureOperation = new WriteScreenshotToFileOperation(mCfgMgr.getUserDataPath().string(),
|
mScreenCaptureOperation = new WriteScreenshotToFileOperation(
|
||||||
|
mCfgMgr.getScreenshotPath(Settings::Manager::getString("screenshot path", "General")).string(),
|
||||||
Settings::Manager::getString("screenshot format", "General"));
|
Settings::Manager::getString("screenshot format", "General"));
|
||||||
|
|
||||||
mScreenCaptureHandler = new osgViewer::ScreenCaptureHandler(mScreenCaptureOperation);
|
mScreenCaptureHandler = new osgViewer::ScreenCaptureHandler(mScreenCaptureOperation);
|
||||||
|
|
|
@ -196,4 +196,17 @@ const boost::filesystem::path& ConfigurationManager::getLogPath() const
|
||||||
return mLogPath;
|
return mLogPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const boost::filesystem::path ConfigurationManager::getScreenshotPath(std::string const& screenshotSettings) const
|
||||||
|
{
|
||||||
|
boost::filesystem::path ssPath = screenshotSettings;
|
||||||
|
if (ssPath.is_relative()) {
|
||||||
|
ssPath = mFixedPath.getUserDataPath() / ssPath;
|
||||||
|
}
|
||||||
|
boost::system::error_code dirErr;
|
||||||
|
if (!boost::filesystem::create_directories(ssPath, dirErr) && !boost::filesystem::is_directory(ssPath)) {
|
||||||
|
ssPath = mFixedPath.getUserDataPath();
|
||||||
|
}
|
||||||
|
return ssPath;
|
||||||
|
}
|
||||||
|
|
||||||
} /* namespace Cfg */
|
} /* namespace Cfg */
|
||||||
|
|
|
@ -41,6 +41,7 @@ struct ConfigurationManager
|
||||||
const boost::filesystem::path& getCachePath() const;
|
const boost::filesystem::path& getCachePath() const;
|
||||||
|
|
||||||
const boost::filesystem::path& getLogPath() const;
|
const boost::filesystem::path& getLogPath() const;
|
||||||
|
const boost::filesystem::path getScreenshotPath(std::string const& screenshotSetting) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Files::FixedPath<> FixedPathType;
|
typedef Files::FixedPath<> FixedPathType;
|
||||||
|
|
|
@ -284,6 +284,9 @@ anisotropy = 4
|
||||||
# File format for screenshots. (jpg, png, tga, and possibly more).
|
# File format for screenshots. (jpg, png, tga, and possibly more).
|
||||||
screenshot format = png
|
screenshot format = png
|
||||||
|
|
||||||
|
# Directory to store screenshots in. Supports relative and absolute paths. Relative paths will be to the user data folder.
|
||||||
|
screenshot path =./
|
||||||
|
|
||||||
# Texture magnification filter type. (nearest or linear).
|
# Texture magnification filter type. (nearest or linear).
|
||||||
texture mag filter = linear
|
texture mag filter = linear
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue