Skip to content

Commit 6fa2995

Browse files
committed
feat: make LCUI_MAX_FRAMES_PER_SEC public
1 parent e69220a commit 6fa2995

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/LCUI/main.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
#ifndef LCUI_MAIN_H
3232
#define LCUI_MAIN_H
3333

34+
/** 一秒内的最大更新帧数 */
35+
#define LCUI_MAX_FRAMES_PER_SEC 120
36+
3437
LCUI_BEGIN_HEADER
3538

3639
typedef LCUI_TaskFunc LCUI_AppTaskFunc;

src/main.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@
5858
#define STATE_ACTIVE 1
5959
#define STATE_KILLED 0
6060

61-
/** 一秒内的最大更新帧数 */
62-
#define MAX_FRAMES_PER_SEC 120
63-
6461
typedef struct LCUI_MainLoopRec_ {
6562
int state; /**< 主循环的状态 */
6663
LCUI_Thread tid; /**< 当前运行该主循环的线程的ID */
@@ -445,7 +442,7 @@ void LCUI_InitApp(LCUI_AppDriver app)
445442
MainApp.workers[i] = LCUIWorker_New();
446443
LCUIWorker_RunAsync(MainApp.workers[i]);
447444
}
448-
StepTimer_SetFrameLimit(MainApp.timer, MAX_FRAMES_PER_SEC);
445+
StepTimer_SetFrameLimit(MainApp.timer, LCUI_MAX_FRAMES_PER_SEC);
449446
if (!app) {
450447
app = LCUI_CreateAppDriver();
451448
if (!app) {

0 commit comments

Comments
 (0)