Fix initial size being smaller than the min size

This commit is contained in:
Zachary Hall 2023-07-16 14:11:50 -07:00
parent cd3d3ba52e
commit 2a0db4ae3e

View file

@ -117,8 +117,11 @@ int main(int, char**)
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
int window_width = 475;
int window_height = 354;
SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
SDL_Window* window = SDL_CreateWindow(NAME, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 475, 54, window_flags);
SDL_Window* window = SDL_CreateWindow(NAME, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, window_width, window_height, window_flags);
SDL_SetWindowMinimumSize(window, window_width, window_height);
if (enable_kms) {
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
}
@ -185,9 +188,6 @@ int main(int, char**)
#endif
);
fileDialog.SetPwd(path(userdir) / path("Music"));
int window_width = 475;
int window_height = 354;
SDL_SetWindowMinimumSize(window, window_width, window_height);
fileDialog.SetWindowSize(window_width, window_height);
//fileDialog.SetWindowPos(0, 0);
Playback *playback = new Playback();