Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change filename of screenshots to something more human readable
- Loading branch information
Showing
1 changed file
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4fbcfac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should include miliseconds or a serial value (imagine trying to grab a bunch of shots of TNT going off hoping for a good one).
I'd also prefer if this used ISO 8601 format (
"%FT%T"
without miliseconds).4fbcfac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the T is easy enough. I don't like the '-' in filenames but that should not stop them being used (we discussed this on IRC briefly) so %FT%F is ok with me. The ms or serial is the more problematic issue. Do you have any ideas? I suppose getRealTime() can be appended as well (or some division of... maybe %1000 for a 'serial number' in the range 0-999 (I doubt many computers will be able to take 999 screenshots a second)?
4fbcfac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "serial" I meant screanshot_foo.png, screenshot_foo-1.png, etc --- like the player saving code does. Dashes should not be an issue at all. In ISO 8601 format the miliseconds are appended seperated by a dot. It could be a colon instead if dumb file managers cause issues though. Milisecond resolution should be plenty, although something inside me prefers the serial version because you probably could take two screenshots in a millisecond and it should still work.