1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-15 20:15:24 +00:00
OpenDiablo2/src/OpenDiablo2.SDL2/src/D2Input.cpp

28 lines
412 B
C++
Raw Normal View History

2019-02-23 01:14:35 +00:00
#include <OpenDiablo2.System/D2Input.h>
#include <SDL2/SDL.h>
namespace OpenDiablo2 {
namespace System {
D2Input::D2Input() {
SDL_Init(SDL_INIT_EVENTS);
}
void
D2Input::ProcessEvents() {
SDL_Event event;
while (SDL_PollEvent(&event)) {
if( event.type == SDL_QUIT ) {
quitIsRequested = true;
}
}
}
bool
D2Input::QuitIsRequested() {
return quitIsRequested;
}
}
}