comparison src/video/SDL_clipboard.c @ 4500:eff4e88cc1e8

Added Windows clipboard support
author Sam Lantinga <slouken@libsdl.org>
date Thu, 08 Jul 2010 05:43:34 -0700
parents dbbfdb9ea716
children b577f47379f3
comparison
equal deleted inserted replaced
4499:c2ebe3e020c6 4500:eff4e88cc1e8
28 int 28 int
29 SDL_SetClipboardText(const char *text) 29 SDL_SetClipboardText(const char *text)
30 { 30 {
31 SDL_VideoDevice *_this = SDL_GetVideoDevice(); 31 SDL_VideoDevice *_this = SDL_GetVideoDevice();
32 32
33 if (!text) {
34 text = "";
35 }
33 if (_this->SetClipboardText) { 36 if (_this->SetClipboardText) {
34 return _this->SetClipboardText(_this, text); 37 return _this->SetClipboardText(_this, text);
35 } else { 38 } else {
36 _this->clipboard_text = SDL_strdup(text); 39 _this->clipboard_text = SDL_strdup(text);
37 return 0; 40 return 0;