mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
[fix] do not forget to destroy the texture
This commit is contained in:
@@ -616,6 +616,7 @@ int Render::Run() {
|
|||||||
texture_width_ = video_width_;
|
texture_width_ = video_width_;
|
||||||
texture_height_ = video_height_;
|
texture_height_ = video_height_;
|
||||||
|
|
||||||
|
SDL_DestroyTexture(stream_texture_);
|
||||||
stream_texture_ = SDL_CreateTexture(
|
stream_texture_ = SDL_CreateTexture(
|
||||||
main_renderer_, stream_pixformat_, SDL_TEXTUREACCESS_STREAMING,
|
main_renderer_, stream_pixformat_, SDL_TEXTUREACCESS_STREAMING,
|
||||||
texture_width_, texture_height_);
|
texture_width_, texture_height_);
|
||||||
@@ -708,6 +709,7 @@ int Render::Run() {
|
|||||||
ImGui_ImplSDLRenderer2_Shutdown();
|
ImGui_ImplSDLRenderer2_Shutdown();
|
||||||
ImGui_ImplSDL2_Shutdown();
|
ImGui_ImplSDL2_Shutdown();
|
||||||
|
|
||||||
|
SDL_DestroyTexture(stream_texture_);
|
||||||
SDL_DestroyRenderer(main_renderer_);
|
SDL_DestroyRenderer(main_renderer_);
|
||||||
SDL_DestroyWindow(main_window_);
|
SDL_DestroyWindow(main_window_);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user