mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:03:40 +00:00
[client] rename fpsLimit
to fpsMin
This commit is contained in:
parent
4580b18b04
commit
dedab38b99
@ -175,8 +175,8 @@ static struct Option options[] =
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.module = "win",
|
.module = "win",
|
||||||
.name = "fpsLimit",
|
.name = "fpsMinimum",
|
||||||
.description = "Frame rate limit (0 = disable - not recommended, -1 = auto detect)",
|
.description = "Frame rate minimum (0 = disable - not recommended, -1 = auto detect)",
|
||||||
.shortopt = 'K',
|
.shortopt = 'K',
|
||||||
.type = OPTION_TYPE_INT,
|
.type = OPTION_TYPE_INT,
|
||||||
.value.x_int = -1,
|
.value.x_int = -1,
|
||||||
@ -382,7 +382,7 @@ bool config_load(int argc, char * argv[])
|
|||||||
params.borderless = option_get_bool ("win", "borderless" );
|
params.borderless = option_get_bool ("win", "borderless" );
|
||||||
params.fullscreen = option_get_bool ("win", "fullScreen" );
|
params.fullscreen = option_get_bool ("win", "fullScreen" );
|
||||||
params.maximize = option_get_bool ("win", "maximize" );
|
params.maximize = option_get_bool ("win", "maximize" );
|
||||||
params.fpsLimit = option_get_int ("win", "fpsLimit" );
|
params.fpsMin = option_get_int ("win", "fpsMin" );
|
||||||
params.showFPS = option_get_bool ("win", "showFPS" );
|
params.showFPS = option_get_bool ("win", "showFPS" );
|
||||||
params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );
|
params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );
|
||||||
params.noScreensaver = option_get_bool ("win", "noScreensaver");
|
params.noScreensaver = option_get_bool ("win", "noScreensaver");
|
||||||
|
@ -152,8 +152,6 @@ static int renderThread(void * unused)
|
|||||||
|
|
||||||
while(state.running)
|
while(state.running)
|
||||||
{
|
{
|
||||||
clock_gettime(CLOCK_REALTIME, &time);
|
|
||||||
|
|
||||||
if (state.lgrResize)
|
if (state.lgrResize)
|
||||||
{
|
{
|
||||||
if (state.lgr)
|
if (state.lgr)
|
||||||
@ -193,6 +191,7 @@ static int renderThread(void * unused)
|
|||||||
state.resizeDone = true;
|
state.resizeDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clock_gettime(CLOCK_REALTIME, &time);
|
||||||
uint64_t nsec = time.tv_nsec + state.frameTime;
|
uint64_t nsec = time.tv_nsec + state.frameTime;
|
||||||
if(nsec > 1e9)
|
if(nsec > 1e9)
|
||||||
{
|
{
|
||||||
@ -1301,7 +1300,7 @@ static int lg_run()
|
|||||||
updatePositionInfo();
|
updatePositionInfo();
|
||||||
|
|
||||||
//Auto detect active monitor refresh rate for FPS Limit if no FPS Limit was passed.
|
//Auto detect active monitor refresh rate for FPS Limit if no FPS Limit was passed.
|
||||||
if (params.fpsLimit == -1)
|
if (params.fpsMin == -1)
|
||||||
{
|
{
|
||||||
SDL_DisplayMode current;
|
SDL_DisplayMode current;
|
||||||
if (SDL_GetCurrentDisplayMode(SDL_GetWindowDisplayIndex(state.window), ¤t) == 0)
|
if (SDL_GetCurrentDisplayMode(SDL_GetWindowDisplayIndex(state.window), ¤t) == 0)
|
||||||
@ -1310,14 +1309,14 @@ static int lg_run()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_WARN("Unable to capture monitor refresh rate using the default FPS Limit: 60");
|
DEBUG_WARN("Unable to capture monitor refresh rate using the default FPS minimum of 60");
|
||||||
state.frameTime = 1e9 / 60;
|
state.frameTime = 1e9 / 60;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_INFO("Using the FPS Limit from args: %d", params.fpsLimit);
|
DEBUG_INFO("Using the FPS minimum from args: %d", params.fpsMin);
|
||||||
state.frameTime = 1e9 / params.fpsLimit;
|
state.frameTime = 1e9 / params.fpsMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
register_key_binds();
|
register_key_binds();
|
||||||
|
@ -109,7 +109,7 @@ struct AppParams
|
|||||||
bool center;
|
bool center;
|
||||||
int x, y;
|
int x, y;
|
||||||
unsigned int w, h;
|
unsigned int w, h;
|
||||||
unsigned int fpsLimit;
|
unsigned int fpsMin;
|
||||||
bool showFPS;
|
bool showFPS;
|
||||||
bool useSpiceInput;
|
bool useSpiceInput;
|
||||||
bool useSpiceClipboard;
|
bool useSpiceClipboard;
|
||||||
|
Loading…
Reference in New Issue
Block a user