Added SDL_SetWindowBordered() API.

--HG--
extra : rebase_source : 11750f0d8e7b59af26d97c778a332c0b4b72ea4b
This commit is contained in:
Ryan C. Gordon 2012-09-13 01:43:53 -04:00
parent 546d0f18a2
commit 8835a0dacb
21 changed files with 159 additions and 83 deletions

View file

@ -1142,6 +1142,17 @@ CommonEvent(CommonState * state, SDL_Event * event, int *done)
}
}
break;
case SDLK_b:
if (event->key.keysym.mod & KMOD_CTRL) {
/* Ctrl-B toggle window border */
SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
if (window) {
const Uint32 flags = SDL_GetWindowFlags(window);
const SDL_bool b = ((flags & SDL_WINDOW_BORDERLESS) != 0);
SDL_SetWindowBordered(window, b);
}
}
break;
case SDLK_ESCAPE:
*done = 1;
break;