summary refs log tree commit diff stats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 22bdf92..2da7d9a 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -1,6 +1,29 @@
1#include <iostream> 1#include <iostream>
2#include "renderer.h"
3
4void loop(Renderer& renderer) {
5 for (;;) {
6 SDL_Event e;
7 while (SDL_PollEvent(&e))
8 {
9 if (e.type == SDL_QUIT)
10 {
11 return;
12 }
13 }
14 }
15}
2 16
3int main(int, char**) { 17int main(int, char**) {
4 std::cout << "hi" << std::endl; 18 try
19 {
20 Renderer renderer;
21
22 loop(renderer);
23 } catch (const sdl_error& ex)
24 {
25 std::cout << "SDL error (" << ex.what() << ")" << std::endl;
26 }
27
5 return 0; 28 return 0;
6} 29}