Trying to access input via externs

Monkey Targets Forums/XNA/Trying to access input via externs

therevills(Posted 2011) [#1]
Im trying to get access to the input variable in mojo.xna.cs, but having a hard time.

This doesnt work:

for( int i=0;i<512;++i ){
    gxtkApp.input.keyStates[i]&=0x100;
}


If I "hack" the mojo.xna.cs and make public gxtkInput input; to be public static gxtkInput input; it works... but I dont want to do this... is there another way?

https://code.google.com/p/diddy/source/browse/trunk/src/diddy/native/diddy.xna.cs


therevills(Posted 2011) [#2]
Would this work?

gxtkApp.game.app.input.keyStates[i]&=0x100;


Ill try it tonight...


dopeyrulz(Posted 2011) [#3]
therevills,

Yes - that does work.


Rushino(Posted 2013) [#4]
What does this do?