2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:44:56 +00:00

windows bug fixes and performance improvements

This commit is contained in:
Jack Andersen
2015-08-31 14:26:35 -10:00
parent b6c1563272
commit af2f2158bb
6 changed files with 135 additions and 15 deletions

View File

@@ -185,9 +185,14 @@ public:
#endif
int lineIdx = 0;
int prevIFactor = -1;
ds.m_instance->doExtract(m_einfo,
[&lineIdx](const HECL::SystemChar* message, int lidx, float factor)
[&lineIdx, &prevIFactor](const HECL::SystemChar* message, int lidx, float factor)
{
int iFactor = factor * 100.0;
if (iFactor == prevIFactor)
return;
prevIFactor = iFactor;
#ifndef _WIN32
if (XTERM_COLOR)
HECL::Printf(_S("" HIDE_CURSOR ""));
@@ -220,7 +225,7 @@ public:
size_t blocks = half - 7;
size_t filled = blocks * factor;
size_t rem = blocks - filled;
HECL::Printf(_S("" BOLD "%3d%% ["), (int)(factor * 100.0));
HECL::Printf(_S("" BOLD "%3d%% ["), iFactor);
for (int b=0 ; b<filled ; ++b)
HECL::Printf(_S("#"), message);
for (int b=0 ; b<rem ; ++b)
@@ -233,7 +238,7 @@ public:
size_t blocks = half - 7;
size_t filled = blocks * factor;
size_t rem = blocks - filled;
HECL::Printf(_S("%3d%% ["), (int)(factor * 100.0));
HECL::Printf(_S("%3d%% ["), iFactor);
for (int b=0 ; b<filled ; ++b)
HECL::Printf(_S("#"), message);
for (int b=0 ; b<rem ; ++b)