From 8dbf28dcd44e9b2c9326e90e8f90f94643982def Mon Sep 17 00:00:00 2001 From: pointer-to-bios Date: Wed, 20 Jul 2022 20:45:42 +0800 Subject: [PATCH] delete redundant function --- includes/syscfg.hh | 15 +++++++-------- libs/syscfg.cc | 11 +++++------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/includes/syscfg.hh b/includes/syscfg.hh index ea34b7e..7e1b7ac 100644 --- a/includes/syscfg.hh +++ b/includes/syscfg.hh @@ -24,6 +24,13 @@ namespace bwl */ _Float64x getFPS(); + /** + * @brief 设置帧率 + * + * @param fps + */ + void setFPS(_Float64x fps); + /** * @brief 获取显示器大小 * @@ -32,14 +39,6 @@ namespace bwl */ void getMoniSize(uint64_t *width, uint64_t *height); - /** - * @brief 设置显示器大小 - * - * @param width - * @param height - */ - void setMoniSize(uint64_t width, uint64_t height); - #define interval(fps) (1000 / fps) //帧率转间隔 }; }; diff --git a/libs/syscfg.cc b/libs/syscfg.cc index c471b73..74bb8a6 100644 --- a/libs/syscfg.cc +++ b/libs/syscfg.cc @@ -61,16 +61,15 @@ namespace bwl return syscfg.fps; } - void getMoniSize(uint64_t *width, uint64_t *height) + void setFPS(_Float64x fps) { - *width = syscfg.size[0]; - *height = syscfg.size[1]; + syscfg.fps = fps; } - void setMoniSize(uint64_t width, uint64_t height) + void getMoniSize(uint64_t *width, uint64_t *height) { - syscfg.size[0] = width; - syscfg.size[1] = height; + *width = syscfg.size[0]; + *height = syscfg.size[1]; } }; }; -- GitLab