Reputation: 85
I am implementing a video player API sw which plays video for given Rtsp adress. Softwares which use API pass a window handle to API and API render video on it. I tried to render frames using SDL and it is OK. But when I destroy SDL_Window using SDL_DestroyWindow(), native window that other software pass its handle, is also destroyed. Then I commented SDL_DestroyWindow part, but this time reusing same native window handle is a problem. When other software pass API the same native window handle and I create an SDL_Window using SDL_CreateWindowFrom(), other software can not get native window click events. Is there a way converting SDL_Window again to a native window? or do you have any solution suggestion for my problem?
Upvotes: 0
Views: 809
Reputation: 85
As Keltar said, ShowWindow(handle, SW_SHOW) solves the problem. Since SDL hides the window when SDL_DestroyWindow() called, window should be shown by calling ShowWindow(handle, SW_SHOW)
Upvotes: 2