| Summary: | SDL_EnableUNICODE + SDL_ENABLEAPPEVENTS produce extra system beeps | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Marc S. Ressl <mressl> |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.12 | ||
| Hardware: | PowerPC | ||
| OS: | Mac OS X (All) | ||
| URL: | http://www-personal.umich.edu/~mressl | ||
I am writing an SDL program which should be portable (that's why I use SDL), but features a customized Cocoa userinterface that uses CMD key shortcuts. I need to enable SDL_ENABLEAPPEVENTS and SDL_EnableUNICODE. When I do so, application events (triggered with the CMD key) perform their action, but a system beep is also heard. I found the bug in /src/video/quartz/SDL_QuartzEvents.m. There is an (apparently to me) unnecessary call to interpretKeyEvents:. The solution would be to remove this call: if (SDL_TranslateUNICODE && state == SDL_PRESSED) { // [field_edit interpretKeyEvents:[NSArray arrayWithObject:event]]; chars = [ event characters ]; Thanks