mirror of
https://github.com/KranX/Vangers.git
synced 2025-11-30 23:15:27 +07:00
Merge pull request #604 from XiadaOku/resolution-fix
Init window with resolution size
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -294,6 +294,7 @@ void XGR_Screen::set_resolution(int width, int height){
|
||||
}
|
||||
|
||||
destroy_surfaces();
|
||||
SDL_SetWindowSize(sdlWindow, width, height);
|
||||
create_surfaces(width, height);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user