Skip to content

Commit

Permalink
とりあえずスクショ形式を選べるように
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Ojii committed Dec 4, 2024
1 parent 707f414 commit bec97ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions TJAPlayer3-f/src/Common/CConfigToml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public string SkinPath
public string _AbsSkinPath = "";
public string FFmpegPath { get; set; } = "";
public string FontName { get; set; } = CFontRenderer.DefaultFontName;
public string ScreenShotExt { get; set; } = ".png";
}

public CWindow Window { get; set; } = new();
Expand Down Expand Up @@ -474,6 +475,10 @@ public void Save(string FilePath)
sw.WriteLine("# Font name used for font rendering.");
sw.WriteLine("{0} = \"{1}\"", nameof(this.General.FontName), this.General.FontName);
sw.WriteLine();
sw.WriteLine("# スクリーンショットの拡張子 (\".bmp\" or \".jpg\" or \".png\" or \".webp\")");
sw.WriteLine("# Extension for screen shot file. (\".bmp\" or \".jpg\" or \".png\" or \".webp\")");
sw.WriteLine("{0} = \"{1}\"", nameof(this.General.ScreenShotExt), this.General.ScreenShotExt);
sw.WriteLine();
sw.WriteLine("[{0}]", nameof(this.Window));
sw.WriteLine("# フルスクリーンにするか");
sw.WriteLine("{0} = {1}", nameof(this.Window.FullScreen), this.Window.FullScreen.ToString().ToLowerInvariant());
Expand Down
2 changes: 1 addition & 1 deletion TJAPlayer3-f/src/Common/TJAPlayer3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ protected override void OnRenderFrame(EventArgs e)
// Debug.WriteLine( "capture: " + string.Format( "{0:2x}", (int) e.KeyCode ) + " " + (int) e.KeyCode );
string strFullPath =
Path.Combine(TJAPlayer3.strEXEのあるフォルダ, "Capture_img");
strFullPath = Path.Combine(strFullPath, DateTime.Now.ToString("yyyyMMddHHmmss") + ".png");
strFullPath = Path.Combine(strFullPath, DateTime.Now.ToString("yyyyMMddHHmmss") + ConfigToml.General.ScreenShotExt);
this.SaveScreen(strFullPath);
}
if (ConfigIni.KeyAssign.FullScreen[i].Code > 0)
Expand Down

0 comments on commit bec97ac

Please sign in to comment.