diff --git a/src/main.c b/src/main.c index fe5d6266..14cdf081 100644 --- a/src/main.c +++ b/src/main.c @@ -89,8 +89,8 @@ int main(int argc, char **argv) { SDL_GetCurrentDisplayMode(0, &dm); window = SDL_CreateWindow( - "", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - dm.w * 0.8, dm.h * 0.8, SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + "", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, dm.w * 0.8, dm.h * 0.8, + SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_HIDDEN); init_window_icon(); ren_init(window); diff --git a/src/renderer.c b/src/renderer.c index cc88cb89..695634f2 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -1,4 +1,5 @@ #include +#include #include #include #include "lib/stb/stb_truetype.h" @@ -65,6 +66,11 @@ void ren_init(SDL_Window *win) { void ren_update_rects(RenRect *rects, int count) { SDL_UpdateWindowSurfaceRects(window, (SDL_Rect*) rects, count); + static bool initial_frame = true; + if (initial_frame) { + SDL_ShowWindow(window); + initial_frame = false; + } }