aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/Window.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-09-02 10:47:18 +0800
committerchai <chaifix@163.com>2018-09-02 10:47:18 +0800
commit6d67345bd5ddea7a4ce37e6bbeda15d341b1ee82 (patch)
tree2d41b1ba3bd68ced24e11cb801a61d5417357229 /src/libjin/Graphics/Window.cpp
parentbbecfee3b69fd2d2015305f3d04c02f87d4924b0 (diff)
*update
Diffstat (limited to 'src/libjin/Graphics/Window.cpp')
-rw-r--r--src/libjin/Graphics/Window.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libjin/Graphics/Window.cpp b/src/libjin/Graphics/Window.cpp
index f4ca9aa..4e168dc 100644
--- a/src/libjin/Graphics/Window.cpp
+++ b/src/libjin/Graphics/Window.cpp
@@ -24,8 +24,8 @@ namespace graphics
return false;
const Setting* setting = (Setting*)s;
- width = setting->width;
- height = setting->height;
+ size.x = setting->width;
+ size.y = setting->height;
fps = setting->fps;
bool vsync = setting->vsync;
const char* title = setting->title;
@@ -59,7 +59,7 @@ namespace graphics
if (setting->fullscreen) flag |= SDL_WINDOW_FULLSCREEN;
if (setting->resizable) flag |= SDL_WINDOW_RESIZABLE;
- wnd = SDL_CreateWindow(title, wx, wy, width, height, flag);
+ wnd = SDL_CreateWindow(title, wx, wy, size.x, size.y, flag);
if (wnd == NULL)
return false;
ctx = SDL_GL_CreateContext(wnd);