* when the New PPU is on, it displays "(NewPPU)" in the window caption
* fixed bug with erasing more frames than there is movie records
This commit is contained in:
parent
8ece25e006
commit
1c2d6d88bc
|
@ -425,7 +425,7 @@ void GREENZONE::AdjustUp()
|
|||
{
|
||||
bool markers_changed = false;
|
||||
// delete these frames of lag
|
||||
currMovieData.records.erase(currMovieData.records.begin() + (currFrameCounter - 1), currMovieData.records.begin() + (currFrameCounter - 1 + num_frames_to_erase));
|
||||
currMovieData.eraseRecords(currFrameCounter - 1, num_frames_to_erase);
|
||||
laglog.EraseFrame(currFrameCounter - 1, num_frames_to_erase);
|
||||
if (taseditor_config.bind_markers)
|
||||
{
|
||||
|
|
|
@ -263,7 +263,7 @@ void SPLICER::DeleteFrames()
|
|||
// delete frames on each selection, going backwards
|
||||
for(SelectionFrames::reverse_iterator it(current_selection->rbegin()); it != current_selection_rend; it++)
|
||||
{
|
||||
currMovieData.records.erase(currMovieData.records.begin() + *it);
|
||||
currMovieData.eraseRecords(*it);
|
||||
greenzone.laglog.EraseFrame(*it);
|
||||
if (taseditor_config.bind_markers)
|
||||
{
|
||||
|
|
|
@ -425,7 +425,7 @@ int TASEDITOR_LUA::applyinputchanges(const char* name)
|
|||
for (int t = pending_changes[i].data; t > 0; t--)
|
||||
{
|
||||
if (pending_changes[i].frame < (int)currMovieData.getNumRecords())
|
||||
currMovieData.records.erase(currMovieData.records.begin() + pending_changes[i].frame);
|
||||
currMovieData.eraseRecords(pending_changes[i].frame);
|
||||
greenzone.laglog.EraseFrame(pending_changes[i].frame);
|
||||
if (taseditor_config.bind_markers)
|
||||
markers_manager.EraseMarker(pending_changes[i].frame);
|
||||
|
|
|
@ -185,23 +185,22 @@ string gettingstartedhelp = "{C76AEBD9-1E27-4045-8A37-69E5A52D0F9A}";//Getting S
|
|||
//********************************************************************************
|
||||
void SetMainWindowText()
|
||||
{
|
||||
string str = FCEU_NAME_AND_VERSION;
|
||||
if (newppu)
|
||||
str.append(" (New PPU)");
|
||||
if (GameInfo)
|
||||
{
|
||||
//Add the filename to the window caption
|
||||
extern char FileBase[];
|
||||
string str = FCEU_NAME_AND_VERSION;
|
||||
str.append(": ");
|
||||
str.append(FileBase);
|
||||
|
||||
if (FCEUMOV_IsLoaded())
|
||||
{
|
||||
str.append(" Playing: ");
|
||||
str.append(StripPath(FCEUI_GetMovieName()));
|
||||
}
|
||||
SetWindowText(hAppWnd, str.c_str());
|
||||
}
|
||||
else
|
||||
SetWindowText(hAppWnd, FCEU_NAME_AND_VERSION);
|
||||
SetWindowText(hAppWnd, str.c_str());
|
||||
}
|
||||
|
||||
bool HasRecentFiles()
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "drivers/win/pref.h"
|
||||
|
||||
extern void ResetDebugStatisticsCounters();
|
||||
extern void SetMainWindowText();
|
||||
|
||||
extern bool TaseditorIsRecording();
|
||||
#endif
|
||||
|
@ -132,6 +133,9 @@ void FCEU_TogglePPU(void)
|
|||
FCEU_DispMessage("Old PPU loaded", 0);
|
||||
FCEUI_printf("Old PPU loaded");
|
||||
}
|
||||
#ifdef WIN32
|
||||
SetMainWindowText();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void FCEU_CloseGame(void)
|
||||
|
|
|
@ -113,6 +113,24 @@ void MovieData::clearRecordRange(int start, int len)
|
|||
}
|
||||
}
|
||||
|
||||
void MovieData::eraseRecords(int at, int frames)
|
||||
{
|
||||
if (at < (int)records.size())
|
||||
{
|
||||
if (frames == 1)
|
||||
{
|
||||
// erase 1 frame
|
||||
records.erase(records.begin() + at);
|
||||
} else
|
||||
{
|
||||
// erase many frames
|
||||
if (at + frames > (int)records.size())
|
||||
frames = (int)records.size() - at;
|
||||
records.erase(records.begin() + at, records.begin() + (at + frames));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MovieData::insertEmpty(int at, int frames)
|
||||
{
|
||||
if (at == -1)
|
||||
|
|
|
@ -228,6 +228,7 @@ public:
|
|||
int dump(EMUFILE* os, bool binary);
|
||||
|
||||
void clearRecordRange(int start, int len);
|
||||
void eraseRecords(int at, int frames = 1);
|
||||
void insertEmpty(int at, int frames);
|
||||
void cloneRegion(int at, int frames);
|
||||
|
||||
|
|
Loading…
Reference in New Issue