diff options
Diffstat (limited to 'src/renderer.cpp')
-rw-r--r-- | src/renderer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/renderer.cpp b/src/renderer.cpp index 87e6553..21c4746 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp | |||
@@ -3,11 +3,14 @@ | |||
3 | 3 | ||
4 | Renderer::Renderer() | 4 | Renderer::Renderer() |
5 | { | 5 | { |
6 | SDL_DisplayMode displayMode; | ||
7 | SDL_GetDesktopDisplayMode(0, &displayMode); | ||
8 | |||
6 | win_ = window_ptr( | 9 | win_ = window_ptr( |
7 | SDL_CreateWindow( | 10 | SDL_CreateWindow( |
8 | "Ether", | 11 | "Ether", |
9 | 100, | 12 | displayMode.w / 2 - GAME_WIDTH / 2, |
10 | 100, | 13 | displayMode.h / 2 - GAME_HEIGHT / 2, |
11 | GAME_WIDTH, | 14 | GAME_WIDTH, |
12 | GAME_HEIGHT, | 15 | GAME_HEIGHT, |
13 | SDL_WINDOW_SHOWN)); | 16 | SDL_WINDOW_SHOWN)); |