diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-16 20:34:06 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-16 20:34:06 -0500 |
| commit | bfff9d70936bcc797de7d5069c2822478b46833b (patch) | |
| tree | 36bb102dfcb80fb7263de3ffa4faeea776449533 | |
| parent | 8a2382793367277d07485d6120b706baa36e26ce (diff) | |
| download | volute-bfff9d70936bcc797de7d5069c2822478b46833b.zip | |
init SDL in render init function
| -rw-r--r-- | main.c | 3 | ||||
| -rw-r--r-- | renderer.c | 1 |
2 files changed, 2 insertions, 2 deletions
@@ -68,8 +68,7 @@ static void render_command(mu_Command *cmd); int main(void) { - /* Init SDL and renderer. */ - SDL_Init(SDL_INIT_EVERYTHING); + /* Init renderer. */ r_init(); /* Init microui. */ @@ -20,6 +20,7 @@ static SDL_Window *window; void r_init(void) { /* init SDL window */ + SDL_Init(SDL_INIT_EVERYTHING); window = SDL_CreateWindow( NULL, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL); |