mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 05:25:33 +00:00
Tests: Mir needs the window to swap at lease 1 frame for the cursor to show. So render in testwm2
This commit is contained in:
parent
eadb30cd6f
commit
d8866e8400
|
@ -50,6 +50,7 @@ quit(int rc)
|
||||||
void
|
void
|
||||||
loop()
|
loop()
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
/* Check for events */
|
/* Check for events */
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
|
@ -100,6 +101,12 @@ loop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < state->num_windows; ++i) {
|
||||||
|
SDL_Renderer *renderer = state->renderers[i];
|
||||||
|
SDL_RenderClear(renderer);
|
||||||
|
SDL_RenderPresent(renderer);
|
||||||
|
}
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
if (done) {
|
if (done) {
|
||||||
emscripten_cancel_main_loop();
|
emscripten_cancel_main_loop();
|
||||||
|
@ -122,7 +129,6 @@ main(int argc, char *argv[])
|
||||||
if (!state) {
|
if (!state) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
state->skip_renderer = SDL_TRUE;
|
|
||||||
for (i = 1; i < argc;) {
|
for (i = 1; i < argc;) {
|
||||||
int consumed;
|
int consumed;
|
||||||
|
|
||||||
|
@ -140,6 +146,12 @@ main(int argc, char *argv[])
|
||||||
quit(2);
|
quit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < state->num_windows; ++i) {
|
||||||
|
SDL_Renderer *renderer = state->renderers[i];
|
||||||
|
SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
|
||||||
|
SDL_RenderClear(renderer);
|
||||||
|
}
|
||||||
|
|
||||||
/* Main render loop */
|
/* Main render loop */
|
||||||
done = 0;
|
done = 0;
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
|
|
Loading…
Reference in a new issue