maybe another

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

  • edited April 2013
    and in the same fuction,have a small problem i am not sure:

    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.
  • edited April 2013
    and in the same fuction,nerely the same place below:

    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.
  • edited April 2013
    viavia wrote:
    hi,again:
    Hi!
    in "orx-1.4-srccodesrcioorxInput.c"

    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. :)
    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);
    }

    For a better formatting (and syntax highlighting), you can use the tags [ code ] [ /code ] (without the spaces).
    here ,u want to update if not active when no "new status" ,but why not set off the flag "orxINPUT_KU32_ENTRY_FLAG_ACTIVE"???

    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.
    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?

    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?
    it would not get any problem now,because it's not a public funciton, but may get problems in late release.

    I think for once this one looks good to me. :)

    I'll check your other reports tonight.

    Thanks again!
  • edited April 2013
    As for your two other posts regarding the last active index, the code looks actually fine to me.

    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.
  • edited April 2013
    sorry ,i don't get your meanings too.i say it more carefully.


    "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?
  • edited April 2013
    As for my two other posts, yes ,if u don't use it ,it would be ok.only seem not uniformly.
  • edited April 2013
    Ah I see what you mean, unfortunately the code has changed since 1.4 and there are no "internal calls" anymore.
    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.
  • edited April 2013
    oh , u have changed. but i cant use the Hg update last time i ask for source code.maybe u remenber my first post for help.u give me a http download site.

    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
  • edited April 2013
    That's still the old code version. It doesn't work like this anymore. :)
  • edited April 2013
    oh , u have changed. but i cant use the Hg update last time i ask for source code.maybe u remenber my first post for help.u give me a http download site.

    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
  • edited April 2013
    Ah yes, I remember. You don't need to sync the latest via hg though, you can download the latest version as a zip at: https://bitbucket.org/orx/orx/get/tip.zip
  • edited April 2013
    that's good .thanks
Sign In or Register to comment.