Fix initial size being smaller than the min size
This commit is contained in:
parent
cd3d3ba52e
commit
2a0db4ae3e
1 changed files with 4 additions and 4 deletions
8
main.cpp
8
main.cpp
|
@ -117,8 +117,11 @@ int main(int, char**)
|
||||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||||
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
|
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_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) {
|
if (enable_kms) {
|
||||||
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||||
}
|
}
|
||||||
|
@ -185,9 +188,6 @@ int main(int, char**)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
fileDialog.SetPwd(path(userdir) / path("Music"));
|
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.SetWindowSize(window_width, window_height);
|
||||||
//fileDialog.SetWindowPos(0, 0);
|
//fileDialog.SetWindowPos(0, 0);
|
||||||
Playback *playback = new Playback();
|
Playback *playback = new Playback();
|
||||||
|
|
Loading…
Reference in a new issue