Fix invalid timestamp when opening config dialog before screen capture
Without having taken a screenshot or video yet, the timestamp was invalid but the configuration dialog would still try to use it for filename previews.
On debug builds, this would crash from an assertion. On release builds, it showed an incorrect filename preview such as "Screenshot__.png" when time and date should be included.
(cherry picked from commit 60fb67d3)