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