diff --git a/changelog.txt b/changelog.txt index a83cc8f4..9e5fc684 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +09-july-2010 - mart0258 - TasEdit - cleanup; prevent crash when truncating while turbo 13-june-2010 - adelikat - Win32 - avi capture commandline argument and related parameters 12-june-2010 - adelikat - Save Turbo frame skip amount to config so that it can be customized by user 12-june-2010 - adelikat - Lua - fix speed.mode() so that normal turns off turbo diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 1bfa132e..6a251fd2 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -1325,23 +1325,23 @@ MENU TASEDITMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,11,324,365 - PUSHBUTTON "Truncate",IDC_HACKY1,345,46,51,16 + PUSHBUTTON "Truncate",IDC_HACKY1,348,46,51,16 LTEXT "Any number of these icon buttons are pressed",IDC_STATIC,402,84,47,34 - PUSHBUTTON "<",TASEDIT_REWIND,367,22,22,14 - PUSHBUTTON ">",TASEDIT_FOWARD,410,22,22,14 - PUSHBUTTON "<<",TASEDIT_REWIND_FULL,345,22,22,14 - PUSHBUTTON ">>",TASEDIT_FOWARD_FULL,431,22,22,14 + PUSHBUTTON "<<",TASEDIT_REWIND_FULL,348,22,22,14 + PUSHBUTTON "<",TASEDIT_REWIND,370,22,22,14 + PUSHBUTTON "||",TASEDIT_PLAYSTOP,392,22,22,14 + PUSHBUTTON ">",TASEDIT_FOWARD,414,22,22,14 + PUSHBUTTON ">>",TASEDIT_FOWARD_FULL,436,22,22,14 GROUPBOX "Frames",IDC_STATIC,344,11,120,176 GROUPBOX "Project Input Logs",IDC_STATIC,344,201,120,175 - PUSHBUTTON "Record P1",IDC_BUTTON5,347,95,50,14,WS_DISABLED - PUSHBUTTON "Record P2",IDC_BUTTON7,347,79,50,14,WS_DISABLED - LTEXT "After current frame",IDC_STATIC,347,62,67,11 - PUSHBUTTON "Union Mode",IDC_BUTTON8,347,111,50,14,WS_DISABLED + PUSHBUTTON "Record P1",IDC_BUTTON5,348,95,50,14,WS_DISABLED + PUSHBUTTON "Record P2",IDC_BUTTON7,348,79,50,14,WS_DISABLED + LTEXT "After current frame",IDC_STATIC,348,62,67,11 + PUSHBUTTON "Union Mode",IDC_BUTTON8,348,111,50,14,WS_DISABLED EDITTEXT IDC_EDIT1,348,149,40,14,ES_AUTOHSCROLL PUSHBUTTON "Send",IDC_BUTTON9,392,148,31,14,WS_DISABLED LTEXT "Sends to Notes column",IDC_STATIC,348,137,74,8 - CONTROL "",IDC_LIST2,"SysListView32",LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,349,216,115,160 - PUSHBUTTON "||",TASEDIT_PLAYSTOP,389,22,22,14 + CONTROL "",IDC_LIST2,"SysListView32",LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,348,216,114,156 END ASSEMBLER DIALOGEX 0, 0, 202, 135 diff --git a/src/drivers/win/tasedit.cpp b/src/drivers/win/tasedit.cpp index 27a4b4ad..7d83a38f 100644 --- a/src/drivers/win/tasedit.cpp +++ b/src/drivers/win/tasedit.cpp @@ -128,14 +128,17 @@ void UpdateTasEdit() { if(!hwndTasEdit) return; - if(FCEUMOV_ShouldPause() && FCEUI_EmulationPaused()==0) + if(FCEUI_EmulationPaused()==0) { - FCEUI_ToggleEmulationPause(); - turbo = false; + if (FCEUMOV_ShouldPause()) + { + FCEUI_ToggleEmulationPause(); + turbo = false; + } + else if (turbo && (currFrameCounter &0xf)) + return; } - if (turbo && (currFrameCounter &0xf)) - return; //update the number of items int currLVItemCount = ListView_GetItemCount(hwndList); @@ -1154,8 +1157,9 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case ID_CONTEXT_STRAY_TRUNCATE: case IDC_HACKY1: //hacky1: delete all items after the current selection - currMovieData.records.resize(currFrameCounter+1); + currMovieData.truncateAt(currFrameCounter+1); InvalidateGreenZone(currFrameCounter); + currMovieData.TryDumpIncremental(); UpdateTasEdit(); break; diff --git a/src/fceu.cpp b/src/fceu.cpp index 27ceea10..56307bcf 100644 --- a/src/fceu.cpp +++ b/src/fceu.cpp @@ -992,7 +992,7 @@ void UpdateAutosave(void) void FCEUI_Autosave(void) { - if(!EnableAutosave || !AutoSS) + if(!EnableAutosave || !AutoSS || FCEUMOV_Mode(MOVIEMODE_TASEDIT)) return; if(AutosaveStatus[AutosaveIndex] == 1) diff --git a/src/movie.cpp b/src/movie.cpp index 396156b1..edb89382 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -139,7 +139,7 @@ void MovieData::TryDumpIncremental() } currMovieData.storeTasSavestate(currFrameCounter, Z_DEFAULT_COMPRESSION); - currMovieData.greenZoneCount++; + currMovieData.greenZoneCount=currFrameCounter+1; } else if (currFrameCounter < currMovieData.greenZoneCount || !movie_readonly) { currMovieData.storeTasSavestate(currFrameCounter, Z_DEFAULT_COMPRESSION);