mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-10-26 22:06:06 +03:00
fix(glsdl): move SDL event dispatching to different function
This commit is contained in:
parent
962bcc6a1e
commit
8596860120
@ -1268,6 +1268,8 @@ void CGxDeviceGLSDL::SceneClear(uint32_t mask, CImVector color) {
|
||||
}
|
||||
|
||||
void CGxDeviceGLSDL::ScenePresent() {
|
||||
this->m_GLSDLWindow.DispatchEvents();
|
||||
|
||||
if (this->m_context) {
|
||||
// TODO
|
||||
|
||||
|
||||
@ -209,7 +209,9 @@ void GLSDLWindow::Create(const char* title, const GLSDLWindowRect& rect, GLTextu
|
||||
|
||||
void GLSDLWindow::Swap() {
|
||||
SDL_GL_SwapWindow(this->m_sdlWindow);
|
||||
}
|
||||
|
||||
void GLSDLWindow::DispatchEvents() {
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event)) {
|
||||
this->DispatchSDLEvent(event);
|
||||
|
||||
@ -30,6 +30,7 @@ class GLSDLWindow {
|
||||
void Create(const char* title, const GLSDLWindowRect& rect, GLTextureFormat depthFormat, uint32_t sampleCount);
|
||||
void Destroy();
|
||||
void Swap();
|
||||
void DispatchEvents();
|
||||
void DispatchSDLEvent(const SDL_Event& event);
|
||||
void DispatchSDLKeyboardEvent(const SDL_Event& event);
|
||||
void DispatchSDLMouseMotionEvent(const SDL_Event& event);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user