Skip to content

Commit

Permalink
feat: make LCUI_MAX_FRAMES_PER_SEC public
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Oct 5, 2018
1 parent e69220a commit 6fa2995
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions include/LCUI/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#ifndef LCUI_MAIN_H
#define LCUI_MAIN_H
/** 一秒内的最大更新帧数 */
#define LCUI_MAX_FRAMES_PER_SEC 120

LCUI_BEGIN_HEADER

typedef LCUI_TaskFunc LCUI_AppTaskFunc;
Expand Down
5 changes: 1 addition & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
#define STATE_ACTIVE 1
#define STATE_KILLED 0

/** 一秒内的最大更新帧数 */
#define MAX_FRAMES_PER_SEC 120

typedef struct LCUI_MainLoopRec_ {
int state; /**< 主循环的状态 */
LCUI_Thread tid; /**< 当前运行该主循环的线程的ID */
Expand Down Expand Up @@ -445,7 +442,7 @@ void LCUI_InitApp(LCUI_AppDriver app)
MainApp.workers[i] = LCUIWorker_New();
LCUIWorker_RunAsync(MainApp.workers[i]);
}
StepTimer_SetFrameLimit(MainApp.timer, MAX_FRAMES_PER_SEC);
StepTimer_SetFrameLimit(MainApp.timer, LCUI_MAX_FRAMES_PER_SEC);
if (!app) {
app = LCUI_CreateAppDriver();
if (!app) {
Expand Down

0 comments on commit 6fa2995

Please sign in to comment.