mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
Minor FreeBSD code cleanup.
This commit is contained in:
parent
5f45f4224f
commit
c9c6852f84
@ -82,11 +82,7 @@ SDL_GetBasePath(void)
|
|||||||
#if defined(__FREEBSD__)
|
#if defined(__FREEBSD__)
|
||||||
char fullpath[PATH_MAX];
|
char fullpath[PATH_MAX];
|
||||||
size_t buflen = sizeof (fullpath);
|
size_t buflen = sizeof (fullpath);
|
||||||
int mib[4];
|
const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
||||||
mib[0] = CTL_KERN;
|
|
||||||
mib[1] = KERN_PROC;
|
|
||||||
mib[2] = KERN_PROC_PATHNAME;
|
|
||||||
mib[3] = -1;
|
|
||||||
if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) {
|
if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) {
|
||||||
retval = SDL_strdup(fullpath);
|
retval = SDL_strdup(fullpath);
|
||||||
if (!retval) {
|
if (!retval) {
|
||||||
|
Loading…
Reference in New Issue
Block a user