Home › Forums › Software Development › TX_STATEPATH_SCREENBOUNDS
Tagged: broke after SDK upgrade
- This topic has 6 replies, 2 voices, and was last updated 8 years, 12 months ago by Edward Ryklin.
- AuthorPosts
- 15/12/2015 at 21:39 #3923Edward RyklinParticipant
After upgrading to EyeX SDK 1.5.466 the function no longer works:
success = (txGetStateValueAsSize2(hStateBag, TX_STATEPATH_SCREENBOUNDS, &screenBounds) == TX_RESULT_OK);
success returns 0, can you fix it please.
16/12/2015 at 18:56 #3935Jenny [Tobii]ParticipantHi Edward,
Hm, it works with the latest EyeX Engine. I have a vague memory that we had an engine version where this state path and a number of other state paths that have been deprecated accidentally didn’t work, but it was fixed in the following engine release. Which version of the EyeX Engine are you using?
Anyway, as described in the Readme for the 1.5 SDK that state path has been deprecated and you should use TX_STATEPATH_EYETRACKINGSCREENBOUNDS instead, on EyeX Engine 1.3.0 and higher.
16/12/2015 at 19:10 #3937Edward RyklinParticipantHi Jenny,
I’m looking into this right now. You’re right that there is mention in the readme.txt of SDK Version 1.5 dated 2015-06-12 that
DisplaySize has been deprecated in favor of EyeTrackintgDisplaySize. I tried replacing it but still returns 0.0; worth noting I also had to declare the variable as TX_RECT instead of TX_SIZE2 and calling
success = (txGetStateValueAsRectangle(hStateBag, TX_STATEPATH_EYETRACKINGSCREENBOUNDS, &screenBounds) == TX_RESULT_OK);
instead of txGetStateValueAsSize2,. Though it did compile, at runtime it still returns 0.0 for screenBounds.width and height. I will try upgrading to SDK 1.6 now and will get back to the forum.-Edward
16/12/2015 at 19:29 #3939Jenny [Tobii]ParticipantHi Edward,
Hm. It works fine with txGetStateValueAsSize2 in the MinimalStatusNotification sample. So, it wouldn’t compile unless you used a TX_RECT?
Are you using txGetStateAsync or a state changed handler? If the former, what state path are you using for the txGetStateAsync call? It should work with both TX_STATEPATH_EYETRACKINGSCREENBOUNDS and TX_STATEPATH_EYETRACKING (though the latter includes many more states).
16/12/2015 at 19:38 #3941Edward RyklinParticipantI tried updating to SDK 1.6.477 and also to EyeXEngine 2.0.2.219 but neither helped.
Apparently the problem lies in the heart of txGetState(hContext, TX_STATEPATH_EYETRACKING, &hStateBag); It’s returning a null hStateBag.
I will try switching to the asynchronous version txGetAsyncDataContent as shown in the MinimalStatusNotifications.c in the SDK 1.6.477
16/12/2015 at 20:13 #3942Edward RyklinParticipantNo I was using txGetState()
void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam)
{
TX_HANDLE hStateBag = TX_EMPTY_HANDLE;
TX_BOOL success;switch (connectionState) {
case TX_CONNECTIONSTATE_CONNECTED:txGetState(hContext, TX_STATEPATH_EYETRACKING, &hStateBag);
16/12/2015 at 21:10 #3943Edward RyklinParticipanttxGetStateAsync works, but txGetState does not.
- AuthorPosts
- You must be logged in to reply to this topic.