Small fix for SDL3 API change for SetClipboardText

This commit is contained in:
BjossiAlfreds 2024-10-26 19:56:02 +00:00
parent 07ee830712
commit 4f52c04b3b
2 changed files with 10 additions and 2 deletions

View file

@ -2441,8 +2441,11 @@ IN_GetClipboardText(char *out, size_t n)
SDL_free(s);
}
/* Copy string s to the clipboard.
Returns 0 on success, 1 otherwise.
*/
int
IN_SetClipboardText(const char *s)
{
return SDL_SetClipboardText(s);
return SDL_SetClipboardText(s) != 0;
}

View file

@ -2437,8 +2437,13 @@ IN_GetClipboardText(char *out, size_t n)
SDL_free(s);
}
/* Copy string s to the clipboard.
Returns 0 on success, 1 otherwise.
*/
int
IN_SetClipboardText(const char *s)
{
return SDL_SetClipboardText(s);
bool res = SDL_SetClipboardText(s);
return !res;
}