Merge remote-tracking branch 'yquake2/master'

This commit is contained in:
Denis Pauk 2024-11-10 21:43:50 +02:00
commit 1f0b9904ea
3 changed files with 14 additions and 4 deletions

View file

@ -2331,8 +2331,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;
}

View file

@ -2022,6 +2022,7 @@ FS_Dir_f(void)
char **dirnames; /* File list. */
char findname[1024]; /* File search path and pattern. */
char *path = NULL; /* Search path. */
char *lastsep;
char wildcard[1024] = "*.*"; /* File pattern. */
int i; /* Loop counter. */
int ndirs; /* Number of files in list. */
@ -2043,9 +2044,10 @@ FS_Dir_f(void)
{
for (i = 0; i < ndirs - 1; i++)
{
if (strrchr(dirnames[i], '/'))
lastsep = strrchr(dirnames[i], '/');
if (lastsep)
{
Com_Printf("%s\n", strrchr(dirnames[i], '/') + 1);
Com_Printf("%s\n", lastsep + 1);
}
else
{