audio stats look good on Mac now

This commit is contained in:
wangyix 2014-07-23 11:18:25 -07:00
parent 5b0b484727
commit ba4403b063
2 changed files with 6 additions and 3 deletions

View file

@ -1408,8 +1408,8 @@ void Audio::renderStats(const float* color, int width, int height) {
static const float backgroundColor[4] = { 0.2f, 0.2f, 0.2f, 0.6f };
int x = (width - STATS_WIDTH) / 2;
int y = (height - CENTERED_BACKGROUND_HEIGHT) / 2;
int x = std::max((width - (int)STATS_WIDTH) / 2, 0);
int y = std::max((height - CENTERED_BACKGROUND_HEIGHT) / 2, 0);
int w = STATS_WIDTH;
int h = statsHeight;
renderBackground(backgroundColor, x, y, w, h);

View file

@ -268,8 +268,11 @@ private:
QByteArray* _scopeInput;
QByteArray* _scopeOutputLeft;
QByteArray* _scopeOutputRight;
#ifdef _WIN32
static const unsigned int STATS_WIDTH = 1500;
#else
static const unsigned int STATS_WIDTH = 650;
#endif
static const unsigned int STATS_HEIGHT_PER_LINE = 20;
bool _statsEnabled;