| Summary: | mod state are note handle correctly | ||
|---|---|---|---|
| Product: | SDL | Reporter: | EdB <edb> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P1 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
Bumping a bunch of bugs to Priority 1 for consideration for the 1.2.12 release. --ryan. This is fixed in subversion revision 3155. Thanks! |
i've an hotkey in my app to switch bettewen fullscreen/windowed mode. the first time i use it, i have to press twice the mod key (here shift) to activate it and when swithing is done to repress the mod key like state are lost when switching ... testcase : #include <SDL/SDL.h> #include <iostream> int main (int argc, char **argv) { SDL_Init (SDL_INIT_VIDEO); SDL_SetVideoMode (1024, 768, 0, SDL_FULLSCREEN); SDL_WM_SetCaption ("sdl_bug", "sdl_bug"); int done = 0; bool f = true; while (!done) { SDL_Delay(10); SDL_Event event; while (SDL_PollEvent(&event)) { if (event.key.keysym.sym == SDLK_ESCAPE) done = 1; if (event.type ==SDL_KEYDOWN and event.key.keysym.sym == SDLK_f and event.key.keysym.mod&KMOD_SHIFT) { int flag = 0; if (f) flag &= ~SDL_FULLSCREEN; else flag |= SDL_FULLSCREEN; f = !f; SDL_SetVideoMode (1024, 768, 0, flag); } } } SDL_Quit(); return 0; }