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

@ -339,24 +339,22 @@ static void SelectFileLoop(void)
}
}
//-------------------------------------------------
// Send event to guisan-controls
//-------------------------------------------------
//-------------------------------------------------
// Send event to guisan-controls
//-------------------------------------------------
gui_input->pushInput(event);
}
// Now we let the Gui object perform its logic.
// Now we let the Gui object perform its logic.
uae_gui->logic();
// 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

@ -241,24 +241,22 @@ static void SelectFolderLoop(void)
}
}
//-------------------------------------------------
// Send event to guisan-controls
//-------------------------------------------------
//-------------------------------------------------
// Send event to guisan-controls
//-------------------------------------------------
gui_input->pushInput(event);
}
// Now we let the Gui object perform its logic.
// Now we let the Gui object perform its logic.
uae_gui->logic();
// 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);
}