Skip to content

Commit

Permalink
hide window on startup until ready to render
Browse files Browse the repository at this point in the history
The hidden flag was disabled because it seemed with older sdl versions
to prevent the proper retrieval of the scale factor but with latest
testing it is not the case.
  • Loading branch information
jgmdev committed Oct 9, 2022
1 parent 76db2af commit 6e148f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ int main(int argc, char **argv) {
"", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
800, 450,
SDL_WINDOW_RESIZABLE
| SDL_WINDOW_HIDDEN
#if LITE_USE_SDL_RENDERER
/* causes pixelated rendering when not using the sdl renderer */
| SDL_WINDOW_ALLOW_HIGHDPI
Expand All @@ -169,7 +170,7 @@ int main(int argc, char **argv) {
SDL_Window *windowHDPI = SDL_CreateWindow(
"", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
dm.w * 0.8, dm.h * 0.8,
SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI
SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_HIDDEN
);
#else
SDL_Window *windowHDPI = window;
Expand Down

0 comments on commit 6e148f9

Please sign in to comment.