Fix frame # not showing properly in HUD when recording

This commit is contained in:
jacob1
2019-08-10 20:43:00 -04:00
parent 0ec50951f7
commit d61db0fd63
2 changed files with 2 additions and 6 deletions

View File

@@ -201,7 +201,6 @@ GameView::GameView():
screenshotIndex(0), screenshotIndex(0),
recording(false), recording(false),
recordingFolder(0), recordingFolder(0),
recordingIndex(0),
currentPoint(ui::Point(0, 0)), currentPoint(ui::Point(0, 0)),
lastPoint(ui::Point(0, 0)), lastPoint(ui::Point(0, 0)),
ren(NULL), ren(NULL),
@@ -1070,7 +1069,6 @@ int GameView::Record(bool record)
if (!record) if (!record)
{ {
recording = false; recording = false;
recordingIndex = 0;
recordingFolder = 0; recordingFolder = 0;
} }
else if (!recording) else if (!recording)
@@ -1084,7 +1082,6 @@ int GameView::Record(bool record)
Client::Ref().MakeDirectory("recordings"); Client::Ref().MakeDirectory("recordings");
Client::Ref().MakeDirectory(ByteString::Build("recordings", PATH_SEP, recordingFolder).c_str()); Client::Ref().MakeDirectory(ByteString::Build("recordings", PATH_SEP, recordingFolder).c_str());
recording = true; recording = true;
recordingIndex = 0;
} }
} }
return recordingFolder; return recordingFolder;
@@ -2300,9 +2297,9 @@ void GameView::OnDraw()
} }
} }
if(recording) if (recording)
{ {
String sampleInfo = String::Build(recordingIndex, ". ", String(0xE00E), " REC"); String sampleInfo = String::Build("#", screenshotIndex, " ", String(0xE00E), " REC");
int textWidth = Graphics::textwidth(sampleInfo); int textWidth = Graphics::textwidth(sampleInfo);
g->fillrect(XRES-20-textWidth, 12, textWidth+8, 15, 0, 0, 0, 255*0.5); g->fillrect(XRES-20-textWidth, 12, textWidth+8, 15, 0, 0, 0, 255*0.5);

View File

@@ -69,7 +69,6 @@ private:
int screenshotIndex; int screenshotIndex;
bool recording; bool recording;
int recordingFolder; int recordingFolder;
int recordingIndex;
ui::Point currentPoint, lastPoint; ui::Point currentPoint, lastPoint;
GameController * c; GameController * c;