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