SDL icon indicating copy to clipboard operation
SDL copied to clipboard

SDL3 Request: separate SDL_Init*/SDL_Quit*

Open dustdfg opened this issue 3 years ago • 1 comments

Hello!

I don't know if it is possible to create something like SDL_init.h that doesn't include all headers but only SDL_Init*/SDL_Quit*. I think it will be good to have separate header for it

dustdfg avatar Dec 18 '22 10:12 dustdfg

What's the reason to have just init/quit in its own header? Is it causing problems to include SDL.h?

icculus avatar Dec 19 '22 15:12 icculus

What's the reason to have just init/quit in its own header? Is it causing problems to include SDL.h?

Not to include all unnecessary headers ...? I am not sure but it seems so

dustdfg avatar Dec 19 '22 19:12 dustdfg

Oh, and the idea is that if one only wants video functions they can include SDL_video.h, etc, but the Init calls are in SDL.h which includes everything, right?

That's not a bad point, we should probably look at this.

icculus avatar Dec 20 '22 03:12 icculus

Oh, and the idea is that if one only wants video functions they can include SDL_video.h, etc, but the Init calls are in SDL.h which includes everything, right?

Yes, I meant exactly it

dustdfg avatar Dec 20 '22 13:12 dustdfg

@icculus I think that it also will be good for SDL2.28 because it doesn't break compatibility

dustdfg avatar Dec 22 '22 09:12 dustdfg