From 6249263d2a3a824f4bf4adf9d0c08be914f3a7eb Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Thu, 9 May 2024 10:53:54 +0900 Subject: [PATCH] example: Sync setting size and window default size When WIDTH and HEIGHT values change, the default size of the window also changes. --- examples/Common.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/Common.h b/examples/Common.h index 23d897c6..97f5c604 100644 --- a/examples/Common.h +++ b/examples/Common.h @@ -45,7 +45,7 @@ void win_del(void *data, Evas_Object *o, void *ev) elm_exit(); } -static Eo* createSwView(uint32_t w = 800, uint32_t h = 800) +static Eo* createSwView(uint32_t w = WIDTH, uint32_t h = HEIGHT) { WIDTH = w; HEIGHT = h; @@ -78,7 +78,7 @@ static Eo* createSwView(uint32_t w = 800, uint32_t h = 800) void initGLview(Evas_Object *obj); void drawGLview(Evas_Object *obj); -static Eo* createGlView(uint32_t w = 800, uint32_t h = 800) +static Eo* createGlView(uint32_t w = WIDTH, uint32_t h = HEIGHT) { WIDTH = w; HEIGHT = h; @@ -104,4 +104,5 @@ static Eo* createGlView(uint32_t w = 800, uint32_t h = 800) return view; } -#endif //NO_GL_EXAMPLE \ No newline at end of file +#endif //NO_GL_EXAMPLE +