Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Lactozilla
SRB2
Commits
6e5e74b2
Commit
6e5e74b2
authored
3 years ago
by
Sal
Committed by
Eidolon
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Allow FPS cap values
parent
0e1b01f2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/command.c
+2
-1
2 additions, 1 deletion
src/command.c
src/r_fps.c
+14
-19
14 additions, 19 deletions
src/r_fps.c
with
16 additions
and
20 deletions
src/command.c
+
2
−
1
View file @
6e5e74b2
...
@@ -2076,9 +2076,10 @@ void CV_AddValue(consvar_t *var, INT32 increment)
...
@@ -2076,9 +2076,10 @@ void CV_AddValue(consvar_t *var, INT32 increment)
{
{
increment
=
0
;
increment
=
0
;
currentindice
=
max
;
currentindice
=
max
;
break
;
// The value we definitely want, stop here.
}
}
else
if
(
var
->
PossibleValue
[
max
].
value
==
var
->
value
)
else
if
(
var
->
PossibleValue
[
max
].
value
==
var
->
value
)
currentindice
=
max
;
currentindice
=
max
;
// The value we maybe want.
}
}
if
(
increment
)
if
(
increment
)
...
...
This diff is collapsed.
Click to expand it.
src/r_fps.c
+
14
−
19
View file @
6e5e74b2
...
@@ -27,38 +27,33 @@
...
@@ -27,38 +27,33 @@
#endif
#endif
static
CV_PossibleValue_t
fpscap_cons_t
[]
=
{
static
CV_PossibleValue_t
fpscap_cons_t
[]
=
{
{
-
1
,
"Match refresh rate"
},
{
0
,
"Unlimited"
},
#ifdef DEVELOP
#ifdef DEVELOP
// Lower values are actually pretty useful for debugging interp problems!
// Lower values are actually pretty useful for debugging interp problems!
{
1
,
"One Singular Frame"
},
{
1
,
"MIN"
},
{
10
,
"10"
},
#else
{
20
,
"20"
},
{
TICRATE
,
"MIN"
},
{
25
,
"25"
},
{
30
,
"30"
},
#endif
#endif
{
35
,
"35"
},
{
300
,
"MAX"
},
{
50
,
"50"
},
{
-
1
,
"Unlimited"
},
{
60
,
"60"
},
{
0
,
"Match refresh rate"
},
{
70
,
"70"
},
{
75
,
"75"
},
{
90
,
"90"
},
{
100
,
"100"
},
{
120
,
"120"
},
{
144
,
"144"
},
{
200
,
"200"
},
{
240
,
"240"
},
{
0
,
NULL
}
{
0
,
NULL
}
};
};
consvar_t
cv_fpscap
=
CVAR_INIT
(
"fpscap"
,
"Match refresh rate"
,
CV_SAVE
,
fpscap_cons_t
,
NULL
);
consvar_t
cv_fpscap
=
CVAR_INIT
(
"fpscap"
,
"Match refresh rate"
,
CV_SAVE
,
fpscap_cons_t
,
NULL
);
UINT32
R_GetFramerateCap
(
void
)
UINT32
R_GetFramerateCap
(
void
)
{
{
if
(
cv_fpscap
.
value
<
0
)
if
(
cv_fpscap
.
value
==
0
)
{
{
// 0: Match refresh rate
return
I_GetRefreshRate
();
return
I_GetRefreshRate
();
}
}
if
(
cv_fpscap
.
value
<
0
)
{
// -1: Unlimited
return
0
;
}
return
cv_fpscap
.
value
;
return
cv_fpscap
.
value
;
}
}
...
...
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