Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
tyrquake
Commits
12082ca6
Commit
12082ca6
authored
Oct 09, 2019
by
Libretro-Admin
Browse files
Implement RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE - by setting
framerate to auto it will use the specified refresh rate
parent
23c9f1ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
common/libretro.c
View file @
12082ca6
...
@@ -210,7 +210,7 @@ gp_layout_t classic_alt = {
...
@@ -210,7 +210,7 @@ gp_layout_t classic_alt = {
gp_layout_t
*
gp_layoutp
=
NULL
;
gp_layout_t
*
gp_layoutp
=
NULL
;
unsigned
framerate
=
60
;
float
framerate
=
60
.
0
f
;
static
bool
initial_resolution_set
=
false
;
static
bool
initial_resolution_set
=
false
;
static
int
invert_y_axis
=
1
;
static
int
invert_y_axis
=
1
;
...
@@ -716,9 +716,20 @@ static void update_variables(bool startup)
...
@@ -716,9 +716,20 @@ static void update_variables(bool startup)
var
.
value
=
NULL
;
var
.
value
=
NULL
;
if
(
startup
&&
environ_cb
(
RETRO_ENVIRONMENT_GET_VARIABLE
,
&
var
))
if
(
startup
&&
environ_cb
(
RETRO_ENVIRONMENT_GET_VARIABLE
,
&
var
))
framerate
=
atoi
(
var
.
value
);
{
if
(
!
strcmp
(
var
.
value
,
"auto"
))
{
float
target_framerate
=
0
.
0
f
;
if
(
!
environ_cb
(
RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE
,
&
target_framerate
))
target_framerate
=
60
.
0
f
;
framerate
=
target_framerate
;
}
else
framerate
=
atof
(
var
.
value
);
}
else
else
framerate
=
60
;
framerate
=
60
.
0
f
;
var
.
key
=
"tyrquake_colored_lighting"
;
var
.
key
=
"tyrquake_colored_lighting"
;
var
.
value
=
NULL
;
var
.
value
=
NULL
;
...
...
common/libretro_core_options.h
View file @
12082ca6
...
@@ -72,6 +72,7 @@ struct retro_core_option_definition option_defs_us[] = {
...
@@ -72,6 +72,7 @@ struct retro_core_option_definition option_defs_us[] = {
"Framerate (restart)"
,
"Framerate (restart)"
,
"Modify framerate. Requires a restart."
,
"Modify framerate. Requires a restart."
,
{
{
{
"auto"
,
"Auto"
},
{
"50"
,
"50fps"
},
{
"50"
,
"50fps"
},
{
"60"
,
"60fps"
},
{
"60"
,
"60fps"
},
{
"72"
,
"72fps"
},
{
"72"
,
"72fps"
},
...
@@ -85,7 +86,7 @@ struct retro_core_option_definition option_defs_us[] = {
...
@@ -85,7 +86,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"244"
,
"244fps"
},
{
"244"
,
"244fps"
},
{
NULL
,
NULL
},
{
NULL
,
NULL
},
},
},
"
60
"
"
auto
"
},
},
{
{
"tyrquake_colored_lighting"
,
"tyrquake_colored_lighting"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment