hi,again:
in "orx-1.4-srccodesrcioorxInput.c"
and in "orxInput_Update(const orxCLOCK_INFO *_pstClockInfo, void *_pContext)"
there is codes:
......(at the end)
else
{
orxFLAG_SET(pstEntry->u32Status, orxINPUT_KU32_ENTRY_FLAG_NONE, orxINPUT_KU32_ENTRY_FLAG_NEW_STATUS);
}
here ,u want to update if not active when no "new status" ,but why not set off the flag "orxINPUT_KU32_ENTRY_FLAG_ACTIVE"???
this means that when not active, and when not "new status" ,an internal call would not change the status of the input.Is that what u want?
it would not get any problem now,because it's not a public funciton, but may get problems in late release.
Comments
there is codes:
......(nerely at the end)
if(bActive != orxFALSE)
{
......
orxFLAG_SET(..., ... | (u32ActiveIndex << orxINPUT_KU32_ENTRY_SHIFT_LAST_ACTIVE_BINDING), ...);
}
when active ,and when "NEW_STATUS" ,u set ActiveIndex ,but if here is extern mode, the "u32ActiveIndex " will be 0.of course ,this would not be a big porblem ,
as you have set"stPayload.aeType[0] = orxINPUT_TYPE_EXTERNAL;"
but just seem not convenient.
there is codes:
......(nerely at the end)
if(bActive != orxFALSE)
{
......
else
{
orxFLAG_SET(..., ... | (u32ActiveIndex << orxINPUT_KU32_ENTRY_SHIFT_LAST_ACTIVE_BINDING), ...);
}
}
here ,when active, and when not "NEW_STATUS" ,you just set the same as above.but in this condition ,it may be in combine mode, extern mode ,or really have a u32ActiveIndex.
this also is not a big problem ,but seem strange.
If you don't mind, in the future, you should be using the latest version of the code from https://bitbucket.org/orx/orx as things might have changed since the 1.4 release.
For a better formatting (and syntax highlighting), you can use the tags [ code ] [ /code ] (without the spaces).
Not sure what you mean by that.
In this case, the input isn't active this frame (bActive -> orxFALSE) and wasn't active the previous frame (orxFLAG_TEST(pstEntry->u32Status, orxINPUT_KU32_ENTRY_FLAG_ACTIVE) -> orxFALSE), so we're making sure it's not flagged as having a new status, hence the removal of the flag orxINPUT_KU32_ENTRY_FLAG_NEW_STATUS.
Sorry again, I'm not sure what you mean by "an internal call would not change the status of the input". A call to what?
I think for once this one looks good to me.
I'll check your other reports tonight.
Thanks again!
The active index is only used when an input isn't in combine mode nor externally triggered.
The code stores its value all the time for more efficiency (only 1 code branch for all cases), but when it doesn't have any real meaning, it won't get used.
"an internal call" is what the codes say ,it means using like this way:orxInput_Update(NULL,NULL).
in the other way ,it means it is not called by the core clock loop.
and according to the "orxInput_Update" function ,and if(bActive == orxFALSE) ,and if it is "an internal call" , this funciton would not clear the active flag.
that means ,if u call orxInput_Update(NULL,NULL),and one input entry is proved inactive after calculating ,the function would not describe this new status in the "pstEntry->u32Status".
Is that what u want?
I believe I changed that code when adding support for background input sets.
If you sync the repo I mentioned earlier, you should see the difference.
and later i get the 1.4 release from sourceforg,so by now ,i am using this code.
sorry ,i am in China, and the network conditions are not good ,and sometimes limited by the government ,especially for the website overseas.
if sourceforg's code have updated ,i would try the new one
and later i get the 1.4 release from sourceforg,so by now ,i am using this code.
sorry ,i am in China, and the network conditions are not good ,and sometimes limited by the government ,especially for the website overseas.
if sourceforg's code have updated ,i would try the new one