mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-02 04:56:06 +02:00
Save Instance Prints To File
This commit is contained in:
+11
-1
@@ -30,7 +30,6 @@ namespace VRCX
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
private static readonly MD5 _hasher = MD5.Create();
|
||||
private static bool dialogOpen;
|
||||
|
||||
static AppApi()
|
||||
{
|
||||
@@ -575,5 +574,16 @@ namespace VRCX
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async Task<bool> SavePrintToFile(string url, string fileName)
|
||||
{
|
||||
var directory = Path.Combine(GetVRChatPhotosLocation(), "Prints");
|
||||
Directory.CreateDirectory(directory);
|
||||
var path = Path.Combine(directory, fileName);
|
||||
if (File.Exists(path))
|
||||
return false;
|
||||
|
||||
return await ImageCache.SaveImageToFile(url, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ namespace VRCX
|
||||
{
|
||||
public partial class AppApi
|
||||
{
|
||||
private static bool dialogOpen;
|
||||
|
||||
/// <summary>
|
||||
/// Adds metadata to a PNG screenshot file and optionally renames the file to include the specified world ID.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user