Input
This commit is contained in:
@@ -8,11 +8,12 @@
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
Display::Display(void) :
|
||||
Display::Display(Engine &engine) :
|
||||
#if DAWN_SDL2
|
||||
glContext(nullptr),
|
||||
window(nullptr)
|
||||
window(nullptr),
|
||||
#endif
|
||||
engine(engine)
|
||||
{
|
||||
#if DAWN_SDL2
|
||||
uint32_t flags = SDL_INIT_VIDEO;
|
||||
@@ -72,14 +73,14 @@ void Display::update(void) {
|
||||
while(SDL_PollEvent(&event)) {
|
||||
switch(event.type) {
|
||||
case SDL_QUIT: {
|
||||
Engine::getInstance()->console.exec("exit");
|
||||
engine.console.exec("exit");
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL_WINDOWEVENT: {
|
||||
switch(event.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE: {
|
||||
Engine::getInstance()->console.exec("exit");
|
||||
engine.console.exec("exit");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user