Skip to content

Commit

Permalink
Fix for #15
Browse files Browse the repository at this point in the history
This should fix the issue of negative values being returned when calling
getMousePos on extended displays
  • Loading branch information
Deltatiger committed Jul 27, 2015
1 parent 491f675 commit e7983b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ NAN_METHOD(getMousePos)

//Return object with .x and .y.
Local<Object> obj = NanNew<Object>();
obj->Set(NanNew<String>("x"), NanNew<Number>(pos.x));
obj->Set(NanNew<String>("y"), NanNew<Number>(pos.y));
obj->Set(NanNew<String>("x"), NanNew<Integer>((int)pos.x));
obj->Set(NanNew<String>("y"), NanNew<Integer>((int)pos.y));
NanReturnValue(obj);
}

Expand Down

0 comments on commit e7983b7

Please sign in to comment.