Skip to content

Commit

Permalink
Merge pull request KranX#604 from XiadaOku/resolution-fix
Browse files Browse the repository at this point in the history
Init window with resolution size
  • Loading branch information
stalkerg authored Aug 13, 2022
2 parents 76577dd + 2d3ab1c commit 6fef4b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/xgraph/xgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int XGR_Screen::init(int flags_in)
ErrH.Abort(SDL_GetError(),XERR_USER, 0);
}
} else {
if (SDL_CreateWindowAndRenderer(this->hdWidth, this->hdHeight, SDL_WINDOW_RESIZABLE | SDL_WINDOW_MAXIMIZED, &sdlWindow, &sdlRenderer) < 0) {
if (SDL_CreateWindowAndRenderer(this->hdWidth, this->hdHeight, SDL_WINDOW_RESIZABLE, &sdlWindow, &sdlRenderer) < 0) {
std::cout<<"ERROR2"<<std::endl;
ErrH.Abort(SDL_GetError(),XERR_USER, 0);
}
Expand Down Expand Up @@ -294,6 +294,7 @@ void XGR_Screen::set_resolution(int width, int height){
}

destroy_surfaces();
SDL_SetWindowSize(sdlWindow, width, height);
create_surfaces(width, height);
}

Expand Down

0 comments on commit 6fef4b4

Please sign in to comment.