mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Corrected edge case of creating a snapshot with "" as the filename.
This commit is contained in:
parent
0af8507ce2
commit
049beba157
2 changed files with 5 additions and 6 deletions
|
@ -266,9 +266,8 @@ public:
|
|||
|
||||
float getGameLoopRate() const { return _gameLoopCounter.rate(); }
|
||||
|
||||
// Note that takeSnapshot has a default value, as this method is used internally.
|
||||
void takeSnapshot(bool notify, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = QString());
|
||||
void takeSecondaryCameraSnapshot(const QString& filename);
|
||||
void takeSecondaryCameraSnapshot(const QString& filename = QString());
|
||||
|
||||
void shareSnapshot(const QString& filename, const QUrl& href = QUrl(""));
|
||||
|
||||
|
|
|
@ -334,8 +334,8 @@ public slots:
|
|||
* @param {number} aspectRatio=0 - The width/height ratio of the snapshot required. If the value is <code>0</code> the
|
||||
* full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the
|
||||
* dimensions is adjusted in order to match the aspect ratio.
|
||||
* @param {string} filename=QString() - If this value is not null then the image will be saved to this filename, with an appended ",jpg".
|
||||
* otherwise, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'
|
||||
* @param {string} filename="" - If this value is not given, or is <code>""</code> then the image will be saved to this filename, with an appended ",jpg".
|
||||
* otherwise, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'.
|
||||
* @example <caption>Using the snapshot function and signals.</caption>
|
||||
* function onStillSnapshotTaken(path, notify) {
|
||||
* print("Still snapshot taken: " + path);
|
||||
|
@ -357,7 +357,7 @@ public slots:
|
|||
* var notify = true;
|
||||
* var animated = true;
|
||||
* var aspect = 1920 / 1080;
|
||||
* var filename = QString();
|
||||
* var filename = "";
|
||||
* Window.takeSnapshot(notify, animated, aspect, filename);
|
||||
*/
|
||||
void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f, const QString& filename = QString());
|
||||
|
@ -365,7 +365,7 @@ public slots:
|
|||
/**jsdoc
|
||||
* Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API.
|
||||
* @function Window.takeSecondaryCameraSnapshot
|
||||
* @param {string} filename=QString() - If this value is not null then the image will be saved to this filename, with an appended ".jpg"
|
||||
* @param {string} filename="" - If this value is not given, or is <code>""</code> then the image will be saved to this filename, with an appended ".jpg".
|
||||
*
|
||||
* var filename = QString();
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue