comparison src/video/win32/SDL_win32events.c @ 4755:436183eb30c8

Merge with main repo (mainly for non-printable character fix)
author dewyatt
date Sun, 18 Jul 2010 13:48:23 -0400
parents dc7bdcf06367 9faebccfefb3
children 518d1679d2d0
comparison
equal deleted inserted replaced
4754:2072fed2f583 4755:436183eb30c8
162 } 162 }
163 #endif 163 #endif
164 if (SDL_GetKeyboardFocus() != data->window) { 164 if (SDL_GetKeyboardFocus() != data->window) {
165 SDL_SetKeyboardFocus(data->window); 165 SDL_SetKeyboardFocus(data->window);
166 } 166 }
167 /* FIXME: Update keyboard state */ 167 /*
168 * FIXME: Update keyboard state
169 */
170 WIN_CheckClipboardUpdate(data->videodata);
168 } else { 171 } else {
169 if (SDL_GetKeyboardFocus() == data->window) { 172 if (SDL_GetKeyboardFocus() == data->window) {
170 SDL_SetKeyboardFocus(NULL); 173 SDL_SetKeyboardFocus(NULL);
171 } 174 }
172 if (minimized) { 175 if (minimized) {
585 SDL_free(SDL_Appname); 588 SDL_free(SDL_Appname);
586 SDL_Appname = NULL; 589 SDL_Appname = NULL;
587 } 590 }
588 } 591 }
589 592
590 /* Sets an error message based on GetLastError() */
591 void
592 WIN_SetError(const char *prefix)
593 {
594 TCHAR buffer[1024];
595 char *message;
596 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
597 buffer, SDL_arraysize(buffer), NULL);
598 message = WIN_StringToUTF8(buffer);
599 SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ": " : "", message);
600 SDL_free(message);
601 }
602
603 /* vi: set ts=4 sw=4 expandtab: */ 593 /* vi: set ts=4 sw=4 expandtab: */