mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-29 01:56:27 +00:00
[client] fix divide by zero fault with fpsMin disabled (set to 0)
This commit is contained in:
parent
8ace686df4
commit
ed95f8863d
@ -21,4 +21,4 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
void config_init();
|
void config_init();
|
||||||
bool config_load(int argc, char * argv[]);
|
bool config_load(int argc, char * argv[]);
|
||||||
void config_free();
|
void config_free();
|
||||||
|
@ -166,7 +166,7 @@ static int renderThread(void * unused)
|
|||||||
|
|
||||||
while(state.state != APP_STATE_SHUTDOWN)
|
while(state.state != APP_STATE_SHUTDOWN)
|
||||||
{
|
{
|
||||||
if (state.frameTime > 0)
|
if (params.fpsMin != 0)
|
||||||
{
|
{
|
||||||
lgWaitEventAbs(e_frame, &time);
|
lgWaitEventAbs(e_frame, &time);
|
||||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||||
@ -1472,7 +1472,7 @@ static int lg_run()
|
|||||||
// ensure renderer viewport is aware of the current window size
|
// ensure renderer viewport is aware of the current window size
|
||||||
updatePositionInfo();
|
updatePositionInfo();
|
||||||
|
|
||||||
if (params.fpsMin == -1)
|
if (params.fpsMin <= 0)
|
||||||
{
|
{
|
||||||
// default 30 fps
|
// default 30 fps
|
||||||
state.frameTime = 1000000000ULL / 30ULL;
|
state.frameTime = 1000000000ULL / 30ULL;
|
||||||
|
@ -138,7 +138,7 @@ struct AppParams
|
|||||||
bool center;
|
bool center;
|
||||||
int x, y;
|
int x, y;
|
||||||
unsigned int w, h;
|
unsigned int w, h;
|
||||||
unsigned int fpsMin;
|
int fpsMin;
|
||||||
bool showFPS;
|
bool showFPS;
|
||||||
bool useSpiceInput;
|
bool useSpiceInput;
|
||||||
bool useSpiceClipboard;
|
bool useSpiceClipboard;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user