Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Generate screenshot name with timestamps #8333

Open
wants to merge 2 commits into
base: master
from

Conversation

@CookiePLMonster
Copy link
Contributor

commented Aug 25, 2019

Screenshot names in format GAMEID-YYYY-MM-DD_HH-MM-SS.png are not only more intuitive for the user, but also remove the need for this hideous loop which kept re-checking every possible suffix starting with `GAMEID-1.png'. If the user had thousands of screenshots from the same name, I doubt checking those every time was healthy.

In an unlikely case of name collisions (eg. multiple screenshots within a second), an increasing number gets appended to the filename.

@MayImilae

This comment has been minimized.

Copy link
Contributor

commented Aug 26, 2019

As someone with a collection of screenshots in a separate folder on a hard drive, I have a lot of R3ME01-18(2) nonsense. This will be SO much better for me!

@BhaaLseN
Copy link
Member

left a comment

Code seems good (untested), but you could've moved the (kinda unrelated) std::move changes to another commit.

@CookiePLMonster

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2019

but you could've moved the (kinda unrelated) std::move changes to another commit.

Sure, I'll split them into two commits in a few hours.

@CookiePLMonster CookiePLMonster force-pushed the CookiePLMonster:screenshot-timestamp branch from 3f9f585 to fefba57 Aug 26, 2019

@Techjar

This comment has been minimized.

Copy link
Contributor

commented Aug 28, 2019

I think we should make the format GAMEID_YYYY-MM-DD_HH-MM-SS (and GAMEID_YYYY-MM-DD_HH-MM-SS_N for collided names), as hyphens are used as the separator between date/time numbers, so using underscores to separate the different components of the filename makes it more readable.

Examples:
G8ME01-2019-01-01_12-55-30-1
G8ME01_2019-01-01_12-55-30_1

@CookiePLMonster

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2019

I actually had it suggested yesterday too and I agree. I'll change it later today.

@CookiePLMonster CookiePLMonster force-pushed the CookiePLMonster:screenshot-timestamp branch from fefba57 to 37ef5a5 Aug 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.