mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:52:56 +08:00
Change filename format
This commit is contained in:
parent
f944c29505
commit
4991f2ad2e
@ -76,15 +76,16 @@ namespace osu.Game.Graphics
|
|||||||
|
|
||||||
private string getFileName()
|
private string getFileName()
|
||||||
{
|
{
|
||||||
|
var dt = DateTime.Now;
|
||||||
var fileExt = screenshotFormat.ToString().ToLower();
|
var fileExt = screenshotFormat.ToString().ToLower();
|
||||||
|
|
||||||
var withoutIndex = $"Screenshot.{fileExt}";
|
var withoutIndex = $"osu_{dt:yyyy-MM-dd_HH-mm-ss}.{fileExt}";
|
||||||
if (!storage.Exists(withoutIndex))
|
if (!storage.Exists(withoutIndex))
|
||||||
return withoutIndex;
|
return withoutIndex;
|
||||||
|
|
||||||
for (ulong i = 1; i < ulong.MaxValue; i++)
|
for (ulong i = 1; i < ulong.MaxValue; i++)
|
||||||
{
|
{
|
||||||
var indexedName = $"Screenshot-{i}.{fileExt}";
|
var indexedName = $"osu_{dt:yyyy-MM-dd_HH-mm-ss}-{i}.{fileExt}";
|
||||||
if (!storage.Exists(indexedName))
|
if (!storage.Exists(indexedName))
|
||||||
return indexedName;
|
return indexedName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user