Fixed incorrect texture update that caused a black screen in some GUI
options
This commit is contained in:
Dimitris Panokostas 2017-01-28 01:01:51 +01:00
parent b16497b184
commit d2b9d16f46
3 changed files with 15 additions and 19 deletions

View file

@ -350,13 +350,11 @@ static void SelectFileLoop(void)
// Now we let the Gui object draw itself.
uae_gui->draw();
// Finally we update the screen.
// wait_for_vsync();
// SDL_Flip(gui_screen);
// Update the texture from the surface
SDL_UpdateTexture(texture, NULL, gui_screen->pixels, gui_screen->pitch);
SDL_UpdateTexture(gui_texture, NULL, gui_screen->pixels, gui_screen->pitch);
// Copy the texture on the renderer
SDL_RenderCopy(renderer, texture, NULL, NULL);
SDL_RenderCopy(renderer, gui_texture, NULL, NULL);
// Update the window surface (show the renderer)
SDL_RenderPresent(renderer);

View file

@ -252,13 +252,11 @@ static void SelectFolderLoop(void)
// Now we let the Gui object draw itself.
uae_gui->draw();
// Finally we update the screen.
// wait_for_vsync();
// SDL_Flip(gui_screen);
//
// Update the texture from the surface
SDL_UpdateTexture(texture, NULL, gui_screen->pixels, gui_screen->pitch);
SDL_UpdateTexture(gui_texture, NULL, gui_screen->pixels, gui_screen->pitch);
// Copy the texture on the renderer
SDL_RenderCopy(renderer, texture, NULL, NULL);
SDL_RenderCopy(renderer, gui_texture, NULL, NULL);
// Update the window surface (show the renderer)
SDL_RenderPresent(renderer);
}

View file

@ -145,9 +145,9 @@ static void ShowMessageLoop(void)
// Finally we update the screen.
// Update the texture from the surface
SDL_UpdateTexture(texture, NULL, gui_screen->pixels, gui_screen->pitch);
SDL_UpdateTexture(gui_texture, NULL, gui_screen->pixels, gui_screen->pitch);
// Copy the texture on the renderer
SDL_RenderCopy(renderer, texture, NULL, NULL);
SDL_RenderCopy(renderer, gui_texture, NULL, NULL);
// Update the window surface (show the renderer)
SDL_RenderPresent(renderer);
}