mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-23 21:55:12 +00:00
Improve testgles2 exit behavior (useful on Android)
This commit is contained in:
parent
e3f0d53b55
commit
01550b96cc
|
@ -629,7 +629,7 @@ main(int argc, char *argv[])
|
||||||
while (!done) {
|
while (!done) {
|
||||||
/* Check for events */
|
/* Check for events */
|
||||||
++frames;
|
++frames;
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event) && !done) {
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case SDL_WINDOWEVENT:
|
case SDL_WINDOWEVENT:
|
||||||
switch (event.window.event) {
|
switch (event.window.event) {
|
||||||
|
@ -654,16 +654,18 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
SDLTest_CommonEvent(state, &event, &done);
|
SDLTest_CommonEvent(state, &event, &done);
|
||||||
}
|
}
|
||||||
for (i = 0; i < state->num_windows; ++i) {
|
if (!done) {
|
||||||
status = SDL_GL_MakeCurrent(state->windows[i], context[i]);
|
for (i = 0; i < state->num_windows; ++i) {
|
||||||
if (status) {
|
status = SDL_GL_MakeCurrent(state->windows[i], context[i]);
|
||||||
SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError());
|
if (status) {
|
||||||
|
SDL_Log("SDL_GL_MakeCurrent(): %s\n", SDL_GetError());
|
||||||
|
|
||||||
/* Continue for next window */
|
/* Continue for next window */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Render(state->window_w, state->window_h, &datas[i]);
|
Render(state->window_w, state->window_h, &datas[i]);
|
||||||
SDL_GL_SwapWindow(state->windows[i]);
|
SDL_GL_SwapWindow(state->windows[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue