- Changed I_GetFromClipboard() to return an FString.

SVN r1414 (trunk)
This commit is contained in:
Randy Heit 2009-02-08 03:32:27 +00:00
commit 025e36ee41
8 changed files with 32 additions and 27 deletions

View file

@ -150,16 +150,19 @@ bool CT_Responder (event_t *ev)
}
else if (ev->data1 == 'V' && (ev->data3 & GKM_CTRL))
{
char *clip = I_GetFromClipboard ();
if (clip != NULL)
FString clip = I_GetFromClipboard ();
if (clip.IsNotEmpty())
{
char *clip_p = clip;
strtok (clip, "\n\r\b");
// Only paste the first line.
const char *clip_p = clip;
while (*clip_p)
{
if (*clip_p == '\n' || *clip_p == '\r' || *clip_p == '\b')
{
break;
}
CT_AddChar (*clip_p++);
}
delete[] clip;
}
}
}