mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +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();
|
||||
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)
|
||||
{
|
||||
if (state.frameTime > 0)
|
||||
if (params.fpsMin != 0)
|
||||
{
|
||||
lgWaitEventAbs(e_frame, &time);
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
@ -1472,7 +1472,7 @@ static int lg_run()
|
||||
// ensure renderer viewport is aware of the current window size
|
||||
updatePositionInfo();
|
||||
|
||||
if (params.fpsMin == -1)
|
||||
if (params.fpsMin <= 0)
|
||||
{
|
||||
// default 30 fps
|
||||
state.frameTime = 1000000000ULL / 30ULL;
|
||||
|
@ -138,7 +138,7 @@ struct AppParams
|
||||
bool center;
|
||||
int x, y;
|
||||
unsigned int w, h;
|
||||
unsigned int fpsMin;
|
||||
int fpsMin;
|
||||
bool showFPS;
|
||||
bool useSpiceInput;
|
||||
bool useSpiceClipboard;
|
||||
|
Loading…
Reference in New Issue
Block a user