1. 完善了对于不同平台的shader文件的处理
2. 新增了对红米5Plus的支持 3. 将嵌入式Linux平台的PTT按钮重构成了动态位置大小变化 4. 新增了以Debug编译时显示实时FPS信息显示,在桌面平台表现正常,在嵌入式Linux还存在问题
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef YOSUGA_DEBUG
|
||||
|
||||
#include <QElapsedTimer>
|
||||
#include <QString>
|
||||
|
||||
class QTimer;
|
||||
|
||||
class FpsOverlay
|
||||
{
|
||||
public:
|
||||
FpsOverlay();
|
||||
~FpsOverlay();
|
||||
|
||||
void tick();
|
||||
void draw(int parentWidth, int parentHeight);
|
||||
|
||||
float rightMargin = 0.03f;
|
||||
float topMargin = 0.03f;
|
||||
int fontSize = 20;
|
||||
|
||||
private:
|
||||
QElapsedTimer _elapsed;
|
||||
QTimer* _timer = nullptr;
|
||||
int _frameCount = 0;
|
||||
int _displayedFps = 0;
|
||||
QString _text = "FPS: --";
|
||||
|
||||
void recalcFps();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user