예제 #1
0
파일: framectrl.c 프로젝트: FrankHB/LCUI
/** 初始化帧数控制 */
void FrameControl_Init( FrameCtrlCtx *ctx )
{
	ctx->temp_fps = 0;
	ctx->current_fps = 0;
	ctx->pause_time = 0;
	ctx->one_frame_remain_time = 10;
	ctx->prev_frame_start_time = LCUI_GetTickCount();
	ctx->prev_fps_update_time = LCUI_GetTickCount();
	LCUISleeper_Create( &ctx->wait_continue );
	LCUISleeper_Create( &ctx->wait_pause );
}
예제 #2
0
int GameMsgLoopStart( void )
{
	if( msg_thread_id != 0 ) {
		return -1;
	}
	LCUISleeper_Create( &msg_sleeper );
	Queue_Init( &game_msg_queue, sizeof(GameMsg), NULL );
	return LCUIThread_Create( &msg_thread_id, GameMsgProcThread, NULL );
}
예제 #3
0
파일: timer.c 프로젝트: fshunj/LCUI
/* 初始化定时器模块 */
LCUI_API void LCUIModule_Timer_Init( void )
{
	LCUI_StartTicks();
	LCUISleeper_Create( &timer_sleeper );
	timer_thread_start( &LCUI_Sys.timer_thread, &global_timer_list );
}