[Xperia Play Android Development] farenheith:
Sh*t, you're very right..

Sorry for the fault and thanks for the info!

BTW, I bought Max Payne and I tested it with V0.4 and V0.5. You know what? it's working with touchpad support in v0.4 and is working but no with the touchpad in V0.5.

So, basically, in this moment, you have to choose between Max Payne and FPSe :P.

I'll see if I can solve this

EDIT: >8-O

No... I can't believe this... the Max Payne is validating the SDK Version to activate OR NOT the touchpad u.u...

It's shameful... Why didn't they used a f*ck try - catch???

I need a way to switch globally the touchpad activation to make games with checks like this one works with the touchpad. I'll do a app that sets a static property to it. I think it'll work

Edit2:

People, I need help. I don't know android development well yet, and the fix development is in a crucial point. I found out, with Max Payne as you can read, that some games validate the SDK version to activate or not the touchpad. The thing is, if the touchpad is always activated, then probably this games will work with it, but is report that it breaks the touchpad support of FPSe.

My idea here is create some kind of trigger (like a widget, maybe) to determine when the touchpad is always activated and when the game has to activate it. We can't change the android SDK version because it just cause many troubles, like format the data partition on the reboot. So, I created a property on the build.prop called "mod.touchpad.activated". if this property is 0, the game has to activate the touchpad, if is 1, then the touchpad is always activated. To use this resource, you need to change the isTouchpadActivated method of the View.smali to looks like this:

.method public isTouchpadActivated(Landroid/view/MotionEvent;)I
.locals 2

invoke-virtual {p1}, Landroid/view/MotionEvent;->getSource()I

move-result v0

sget v1, Landroid/view/InputDevice;->SOURCE_TOUCHPAD:I

if-ne v0, v1, :cond_0

const/4 v0, 0x0

const-string/jumbo v1, "mod.touchpad.activated"

invoke-static {v1, v0}, Landroid/os/SystemProperties;->getInt(Ljava/lang/String;I)I

move-result v0

if-nez v0, :cond_1

invoke-virtual {p0}, Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl;

move-result-object v0

iget v0, v0, Landroid/view/ViewRootImpl;->BIND_TOUCHPAD_ONTOUCH:I

goto :goto_0

:cond_0
const/4 v0, 0x0

:goto_0
:cond_1
return v0
.end method

After that, if you want to change the touchpad behavior, you can change/create the property on the build.prop with the desired value, again:

1 for always activated

0 for game has to activate it

After change this property, you need to reboot you phone (it's very annoying)

The thing is: I need a method to make a switcher that we don't have to reboot the phone to take effect. But this method may use just classes of the framework.jar. It can't use classes of another file.

After this "switcher" is created, then we can make some widget/app that use it to make our life easier. that's the idea, but I don't know how to do it.

The best result I get until now is the property on the build.prop.

Any ideas?

Edit 3: NEVER MIND!

Just need to use setprop and getprop YAY!

I'll do the changes we need and update to V 0.6