comparison src/video/win32/SDL_win32video.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 22aa6a631d34 9faebccfefb3
children bb2e32f5a556
comparison
equal deleted inserted replaced
4754:2072fed2f583 4755:436183eb30c8
32 #include "SDL_gdirender.h" 32 #include "SDL_gdirender.h"
33 33
34 /* Initialization/Query functions */ 34 /* Initialization/Query functions */
35 static int WIN_VideoInit(_THIS); 35 static int WIN_VideoInit(_THIS);
36 static void WIN_VideoQuit(_THIS); 36 static void WIN_VideoQuit(_THIS);
37
38 /* Sets an error message based on GetLastError() */
39 void
40 WIN_SetError(const char *prefix)
41 {
42 TCHAR buffer[1024];
43 char *message;
44 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
45 buffer, SDL_arraysize(buffer), NULL);
46 message = WIN_StringToUTF8(buffer);
47 SDL_SetError("%s%s%s", prefix ? prefix : "", prefix ? ": " : "", message);
48 SDL_free(message);
49 }
37 50
38 /* WIN32 driver bootstrap functions */ 51 /* WIN32 driver bootstrap functions */
39 52
40 static int 53 static int
41 WIN_Available(void) 54 WIN_Available(void)
164 #endif 177 #endif
165 device->StartTextInput = WIN_StartTextInput; 178 device->StartTextInput = WIN_StartTextInput;
166 device->StopTextInput = WIN_StopTextInput; 179 device->StopTextInput = WIN_StopTextInput;
167 device->SetTextInputRect = WIN_SetTextInputRect; 180 device->SetTextInputRect = WIN_SetTextInputRect;
168 181
182 device->SetClipboardText = WIN_SetClipboardText;
183 device->GetClipboardText = WIN_GetClipboardText;
184 device->HasClipboardText = WIN_HasClipboardText;
185
169 device->free = WIN_DeleteDevice; 186 device->free = WIN_DeleteDevice;
170 187
171 return device; 188 return device;
172 } 189 }
173 190