Commit 536d5843 authored by Patrice Mandin's avatar Patrice Mandin

Simply resize existing window

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402315
parent 3e781010
...@@ -778,19 +778,12 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current, ...@@ -778,19 +778,12 @@ SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
/* Open the window */ /* Open the window */
wind_open(GEM_handle,x2,y2,w2,h2); wind_open(GEM_handle,x2,y2,w2,h2);
} else { } else {
/* Resize window if needed, to fit asked video mode */ /* Resize window to fit asked video mode */
if (modeflags & SDL_RESIZABLE) {
wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2); wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
if ((w2&15)!=0) {
w2=(w2|15)+1;
}
if ((w2!=width) || (h2!=height)) {
if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) { if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2); wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
} }
} }
}
}
GEM_fullscreen = SDL_FALSE; GEM_fullscreen = SDL_FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment