mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 04:31:09 +00:00
Merge remote-tracking branch 'yquake2/master'
This commit is contained in:
commit
1f0b9904ea
3 changed files with 14 additions and 4 deletions
|
@ -2331,8 +2331,11 @@ IN_GetClipboardText(char *out, size_t n)
|
||||||
SDL_free(s);
|
SDL_free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Copy string s to the clipboard.
|
||||||
|
Returns 0 on success, 1 otherwise.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
IN_SetClipboardText(const char *s)
|
IN_SetClipboardText(const char *s)
|
||||||
{
|
{
|
||||||
return SDL_SetClipboardText(s);
|
return SDL_SetClipboardText(s) != 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2437,8 +2437,13 @@ IN_GetClipboardText(char *out, size_t n)
|
||||||
SDL_free(s);
|
SDL_free(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Copy string s to the clipboard.
|
||||||
|
Returns 0 on success, 1 otherwise.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
IN_SetClipboardText(const char *s)
|
IN_SetClipboardText(const char *s)
|
||||||
{
|
{
|
||||||
return SDL_SetClipboardText(s);
|
bool res = SDL_SetClipboardText(s);
|
||||||
|
|
||||||
|
return !res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2022,6 +2022,7 @@ FS_Dir_f(void)
|
||||||
char **dirnames; /* File list. */
|
char **dirnames; /* File list. */
|
||||||
char findname[1024]; /* File search path and pattern. */
|
char findname[1024]; /* File search path and pattern. */
|
||||||
char *path = NULL; /* Search path. */
|
char *path = NULL; /* Search path. */
|
||||||
|
char *lastsep;
|
||||||
char wildcard[1024] = "*.*"; /* File pattern. */
|
char wildcard[1024] = "*.*"; /* File pattern. */
|
||||||
int i; /* Loop counter. */
|
int i; /* Loop counter. */
|
||||||
int ndirs; /* Number of files in list. */
|
int ndirs; /* Number of files in list. */
|
||||||
|
@ -2043,9 +2044,10 @@ FS_Dir_f(void)
|
||||||
{
|
{
|
||||||
for (i = 0; i < ndirs - 1; i++)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue