Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Simply resize existing window
Browse files Browse the repository at this point in the history
  • Loading branch information
pmandin committed May 26, 2007
1 parent effc8ab commit d4b65cc
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/video/gem/SDL_gemvideo.c
Expand Up @@ -805,19 +805,10 @@ GEM_SetVideoMode(_THIS, SDL_Surface * current,
/* Open the window */
wind_open(GEM_handle, x2, y2, w2, h2);
} else {
/* Resize window if needed, to fit asked video mode */
if (modeflags & SDL_RESIZABLE) {
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)) {
wind_set(GEM_handle, WF_CURRXYWH, x2, y2, w2, h2);
}
}
/* Resize window to fit asked video mode */
wind_get (GEM_handle, WF_WORKXYWH, &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);
}
}

Expand Down

0 comments on commit d4b65cc

Please sign in to comment.