[core,input] use time() instead of timespec_get
android only supports the latter with API >= 29
This commit is contained in:
parent
1d1171489f
commit
0b018057b5
@ -406,10 +406,8 @@ static BOOL freerdp_prevent_session_lock(rdpContext* context)
|
||||
freerdp_settings_get_uint32(context->settings, FreeRDP_FakeMouseMotionInterval);
|
||||
if (FakeMouseMotionInterval && in->lastInputTimestamp)
|
||||
{
|
||||
struct timespec ts = { 0 };
|
||||
if (timespec_get(&ts, TIME_UTC) == 0)
|
||||
return FALSE;
|
||||
if (ts.tv_sec - in->lastInputTimestamp > FakeMouseMotionInterval)
|
||||
const time_t now = time(NULL);
|
||||
if (now - in->lastInputTimestamp > FakeMouseMotionInterval)
|
||||
{
|
||||
WLog_Print(context->log, WLOG_DEBUG,
|
||||
"fake mouse move: x=%d y=%d lastInputTimestamp=%d "
|
||||
|
@ -895,10 +895,8 @@ static BOOL input_update_last_event(rdpInput* input, BOOL mouse, UINT16 x, UINT1
|
||||
|
||||
if (freerdp_settings_get_uint32(input->context->settings, FreeRDP_FakeMouseMotionInterval) > 0)
|
||||
{
|
||||
struct timespec ts = { 0 };
|
||||
if (timespec_get(&ts, TIME_UTC) == 0)
|
||||
return FALSE;
|
||||
in->lastInputTimestamp = ts.tv_sec;
|
||||
const time_t now = time(NULL);
|
||||
in->lastInputTimestamp = now;
|
||||
|
||||
if (mouse)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user