Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
5ad70e3f
Commit
5ad70e3f
authored
2 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Mac hammering
parent
7f9d86b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!83
Merge Linden 6.6.7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llcommon/llsys_objc.h
+1
-1
1 addition, 1 deletion
indra/llcommon/llsys_objc.h
indra/llcommon/llsys_objc.mm
+4
-20
4 additions, 20 deletions
indra/llcommon/llsys_objc.mm
with
5 additions
and
21 deletions
indra/llcommon/llsys_objc.h
+
1
−
1
View file @
5ad70e3f
...
@@ -28,6 +28,6 @@
...
@@ -28,6 +28,6 @@
#define LL_LLSYS_OBJC_H
#define LL_LLSYS_OBJC_H
bool
LLGetDarwinOSInfo
(
int
&
major
,
int
&
minor
,
int
&
patch
);
bool
LLGetDarwinOSInfo
(
int
&
major
,
int
&
minor
,
int
&
patch
);
const
char
*
LLGetDarwinPreferredLanguage
();
#endif // LL_LLSYS_OBJC_H
#endif // LL_LLSYS_OBJC_H
This diff is collapsed.
Click to expand it.
indra/llcommon/llsys_objc.mm
+
4
−
20
View file @
5ad70e3f
...
@@ -35,31 +35,15 @@ static int intAtStringIndex(NSArray *array, int index)
...
@@ -35,31 +35,15 @@ static int intAtStringIndex(NSArray *array, int index)
bool
LLGetDarwinOSInfo
(
int
&
major
,
int
&
minor
,
int
&
patch
)
bool
LLGetDarwinOSInfo
(
int
&
major
,
int
&
minor
,
int
&
patch
)
{
{
NSOperatingSystemVersion
osVersion
=
[[
NSProcessInfo
processInfo
]
operatingSystemVersion
];
NSOperatingSystemVersion
osVersion
=
[[
NSProcessInfo
processInfo
]
operatingSystemVersion
];
major
=
osVersion
.
majorVersion
;
major
=
(
int
)
osVersion
.
majorVersion
;
minor
=
osVersion
.
minorVersion
;
minor
=
(
int
)
osVersion
.
minorVersion
;
patch
=
osVersion
.
patchVersion
;
patch
=
(
int
)
osVersion
.
patchVersion
;
return
true
;
return
true
;
}
}
const
char
*
LLGetDarwinPreferredLanguage
()
const
char
*
LLGetDarwinPreferredLanguage
()
{
{
NSString
*
lang
=
[[
NSLocale
preferredLanguages
]
objectAtIndex
:
0
];
NSString
*
lang
=
[[
NSLocale
preferredLanguages
]
objectAtIndex
:
0
];
const
char
*
ret
=
[
lang
cStringUsingEncoding
:
NSASCIIStringEncoding
];
const
char
*
ret
=
[
lang
cStringUsingEncoding
:
NSASCIIStringEncoding
];
@"/System/Library/CoreServices/SystemVersion.plist"
]
objectForKey
:
@"ProductVersion"
];
NSArray
*
versions
=
[
versionString
componentsSeparatedByString
:
@"."
];
NSUInteger
count
=
[
versions
count
];
if
(
count
>
0
)
{
major
=
intAtStringIndex
(
versions
,
0
);
if
(
count
>
1
)
{
minor
=
intAtStringIndex
(
versions
,
1
);
if
(
count
>
2
)
{
patch
=
intAtStringIndex
(
versions
,
2
);
}
}
}
}
return
ret
;
return
ret
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment