Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SteelT
SRB2
Commits
6218f856
Commit
6218f856
authored
1 year ago
by
Hanicef
Browse files
Options
Downloads
Patches
Plain Diff
Add I_GetSysName to dedicated build
parent
27cf39dd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dedicated/i_system.c
+44
-0
44 additions, 0 deletions
src/dedicated/i_system.c
with
44 additions
and
0 deletions
src/dedicated/i_system.c
+
44
−
0
View file @
6218f856
...
@@ -1522,6 +1522,50 @@ size_t I_GetRandomBytes(char *destination, size_t count)
...
@@ -1522,6 +1522,50 @@ size_t I_GetRandomBytes(char *destination, size_t count)
void
I_RegisterSysCommands
(
void
){}
void
I_RegisterSysCommands
(
void
){}
char
const
*
I_GetSysName
(
void
)
{
// reference: https://sourceforge.net/p/predef/wiki/OperatingSystems/
#if defined(_WIN32) || defined(__CYGWIN__)
return
"Windows"
;
#elif defined(__APPLE__)
return
"Mac OS"
;
#elif defined(__linux__)
return
"Linux"
;
#elif defined(__FreeBSD__)
return
"FreeBSD"
;
#elif defined(__OpenBSD__)
return
"OpenBSD"
;
#elif defined(__NetBSD__)
return
"NetBSD"
;
#elif defined(__DragonFly__)
return
"DragonFly BSD"
;
#elif defined(__gnu_hurd__)
return
"GNU Hurd"
;
// for anyone mental enough to set up an SRB2 server on GNU Hurd
#elif defined(__hpux)
return
"HP-UX"
;
#elif defined(EPLAN9)
return
"Plan 9"
;
#elif defined(__HAIKU__)
return
"Haiku"
;
#elif defined(__BEOS__)
return
"BeOS"
;
#elif defined(__minix)
return
"Minix"
;
#elif defined(__sun)
#if defined(__SVR4) || defined(__srv4__)
return
"Solaris"
;
// this would be so cursed...
#else
return
"SunOS"
;
#endif
#elif defined(_AIX)
return
"AIX"
;
#elif defined(__SYLLABLE__)
return
"SyllableOS"
;
// RIP SyllableOS, i still miss you ;-;
#else
return
"Unknown"
;
#endif
}
void
I_GetCursorPosition
(
INT32
*
x
,
INT32
*
y
)
void
I_GetCursorPosition
(
INT32
*
x
,
INT32
*
y
)
{
{
(
void
)
x
;
(
void
)
x
;
...
...
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