aboutsummaryrefslogtreecommitdiff
path: root/libjin/Graphics
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-28 13:48:26 +0800
committerchai <chaifix@163.com>2018-07-28 13:48:26 +0800
commit3fa76830d3bde5cb3c76da0cc58dd613965b98e5 (patch)
tree6940d7db722a9f010682e3f69ba10ddb19ac4f5d /libjin/Graphics
parent97c96e1d127a7a0c21d6bcf8af97b90649971d1f (diff)
*update
Diffstat (limited to 'libjin/Graphics')
-rw-r--r--libjin/Graphics/Window.cpp1
-rw-r--r--libjin/Graphics/Window.h17
2 files changed, 7 insertions, 11 deletions
diff --git a/libjin/Graphics/Window.cpp b/libjin/Graphics/Window.cpp
index 28e5b84..8a7e8a2 100644
--- a/libjin/Graphics/Window.cpp
+++ b/libjin/Graphics/Window.cpp
@@ -25,6 +25,7 @@ namespace graphics
width = setting->width;
height = setting->height;
+ fps = setting->fps;
bool vsync = setting->vsync;
const char* title = setting->title;
diff --git a/libjin/Graphics/Window.h b/libjin/Graphics/Window.h
index 6213cee..66c34a5 100644
--- a/libjin/Graphics/Window.h
+++ b/libjin/Graphics/Window.h
@@ -19,21 +19,15 @@ namespace graphics
struct Setting : SettingBase
{
public:
+ const char* title; //
int width, height; // ڴС
bool vsync; // ֱͬ
- const char* title; //
+ int fps; // FPS
};
- inline int getW()
- {
- return width;
- }
-
- inline int getH()
- {
- return height;
- }
-
+ inline int getW(){ return width; }
+ inline int getH(){ return height; }
+ inline int getFPS() { return fps; }
inline void swapBuffers();
private:
@@ -46,6 +40,7 @@ namespace graphics
SDL_Window* wnd;
int width, height;
+ int fps;
onlyonce bool initSystem(const SettingBase* setting) override;
onlyonce void quitSystem() override;