comparison src/video/win32/SDL_win32events.c @ 4500:eff4e88cc1e8

Added Windows clipboard support
author Sam Lantinga <slouken@libsdl.org>
date Thu, 08 Jul 2010 05:43:34 -0700
parents 9322f7db8603
children 9faebccfefb3
comparison
equal deleted inserted replaced
4499:c2ebe3e020c6 4500:eff4e88cc1e8
583 SDL_free(SDL_Appname); 583 SDL_free(SDL_Appname);
584 SDL_Appname = NULL; 584 SDL_Appname = NULL;
585 } 585 }
586 } 586 }
587 587
588 /* Sets an error message based on GetLastError() */
589 void
590 WIN_SetError(const char *prefix)
591 {
592 TCHAR buffer[1024];
593 char *message;
594 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
595 buffer, SDL_arraysize(buffer), NULL);
596 message = WIN_StringToUTF8(buffer);
597 SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ": " : "", message);
598 SDL_free(message);
599 }
600
601 /* vi: set ts=4 sw=4 expandtab: */ 588 /* vi: set ts=4 sw=4 expandtab: */