Skip to content

Commit

Permalink
feat: add settings api (lc-soft#191) (lc-soft#211)
Browse files Browse the repository at this point in the history
Restore and re-implement LCUIDisplay_EnablePaintFlashing.

Fixes lc-soft#191
  • Loading branch information
jduo committed Jul 2, 2020
1 parent 209d757 commit e1d5849
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/LCUI/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ LCUI_API size_t LCUIDisplay_Render(void);
/** 呈现渲染后的内容 */
LCUI_API void LCUIDisplay_Present(void);

LCUI_API void LCUIDisplay_EnablePaintFlashing(LCUI_BOOL enable);

/** 设置显示区域的尺寸,仅在窗口化、全屏模式下有效 */
LCUI_API void LCUIDisplay_SetSize(int width, int height);

Expand Down
8 changes: 8 additions & 0 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,14 @@ int LCUIDisplay_GetMode(void)
return display.mode;
}

void LCUIDisplay_EnablePaintFlashing(LCUI_BOOL enable)
{
LCUI_SettingsRec settings;
Settings_Init(&settings);
settings.paint_flashing = enable;
LCUI_ApplySettings(&settings);
}

/** 设置显示区域的尺寸,仅在窗口化、全屏模式下有效 */
void LCUIDisplay_SetSize(int width, int height)
{
Expand Down

0 comments on commit e1d5849

Please sign in to comment.