Implemented #202 (frame-number in framegrab filenames)

Originally committed to SVN as r552.
This commit is contained in:
Niels Martin Hansen 2006-11-23 17:26:53 +00:00
parent b9a61aaa4f
commit 7b68c13318
3 changed files with 7 additions and 3 deletions

View File

@ -17,6 +17,8 @@ Please visit http://aegisub.net to download latest version
o Note that this (unfortunately) doesn't affect video/audio loading, since those still depend on Avisynth, which doesn't support Unicode at all
- Video display fixed on Linux and maybe also Mac (Azzy)
- Misc. fixes for building on Linux (Azzy)
- Redesigned the FexTracker configuration window (jfs)
- Framegrabs from the video now also includes framenumber in the filename (jfs)
= 1.10 beta - 2006.08.07 ===========================

View File

@ -287,7 +287,7 @@ void FrameMain::InitMenu() {
videoMenu->AppendCheckItem(Menu_Video_AR_Default, _("&Default Aspect Ratio"), _("Leave video on original aspect ratio"));
videoMenu->AppendCheckItem(Menu_Video_AR_Full, _("&Fullscreen Aspect Ratio (4:3)"), _("Forces video to fullscreen aspect ratio"));
videoMenu->AppendCheckItem(Menu_Video_AR_Wide, _("&Widescreen Aspect Ratio (16:9)"), _("Forces video to widescreen aspect ratio"));
videoMenu->AppendCheckItem(Menu_Video_AR_235, _("&2.35 Aspect Ratio"), _("Forces video to 2.35 aspect ratio"));
videoMenu->AppendCheckItem(Menu_Video_AR_235, _("2.&35 Aspect Ratio"), _("Forces video to 2.35 aspect ratio"));
videoMenu->AppendCheckItem(Menu_Video_AR_Custom, _("Custom Aspect Ratio..."), _("Forces video to a custom aspect ratio"));
MenuBar->Append(videoMenu, _("&Video"));

View File

@ -630,12 +630,14 @@ void VideoDisplay::OnSaveSnapshot(wxCommandEvent &event) {
}
void VideoDisplay::SaveSnapshot() {
static int session_shot_count = 1;
// Get path
wxFileName file = videoName;
wxString basepath = file.GetPath() + _T("/") + file.GetName();
wxString path;
for (int i=0;;i++) {
path = basepath + wxString::Format(_T("_%03i.png"),i);
while (1) {
path = basepath + wxString::Format(_T("_%03i_%i.png"),session_shot_count,frame_n);
++session_shot_count;
wxFileName tryPath(path);
if (!tryPath.FileExists()) break;
}