Fixed OnEvent logic, Updated example

This commit is contained in:
Robert 2020-05-16 20:09:21 +02:00
parent 05c7cddfd3
commit bf6b934b9b
4 changed files with 19 additions and 16 deletions

View file

@ -11,13 +11,13 @@ int main(int argc, char** argv)
vec *= 1.8f;
std::cout << "Vector2f: " << vec.x << ", " << vec.y << std::endl;
try {
MyWindow window(800, 800, "Test");
}
catch (sdlu::ObjectCreationException e)
MyWindow window(800, 800, "Test");
SDL_Event event;
while (window.WaitEvent(&event))
{
std::cerr << e.what() << std::endl;
std::cerr << SDL_GetError() << std::endl;
std::cout << event.type << std::endl;
}
return 0;
}