Hello, my doubt is that above, because I’m trying to run my game with the game’s code in another thread but something that I never seen with SDL happens:
the SDL_Delay stops the running game’s code thread. Render in the main function.
In my game I want two main threads: game’s rendering and coding. But, I can’t use the code thread because I need to wait some time because the thread runs very fast and the game too. So I put a SDL_Delay in each thread but so the game waits two times. I tried to put only one delay in the code thread but so the main render takes to much processing.
So, how can I split my game in two main threads with the correct delay and without loose performance?