mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
fix(glsdl): move SDL event dispatching to different function
This commit is contained in:
parent
962bcc6a1e
commit
8596860120
3 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue