First, great work! I've tested the last alpha and only some audio laggings and framerate laggings are there. The graphics looks cool! (tested with: Acer Picasso A500, Android 3.2)
This version didnt run at the first try. I had to add the Downloadfile "mupen64plus_data.zip" to the "assets" folder, and after "Home" to add to the function "onUserLeaveHint()" this:
stopEmulator();
nativeQuit();
Joystick and Analog-Key Events:
It would be nice, if you integarte my analog-key script from my USBJoystick Center app, for analog joystick moves with normal key mappings (DPAD left = left / strength=0...64, DPAD right = right / strength=0...64, ...):
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
int[] values = getKeyData(keyCode, event);
textInfo.setText("Keycode: " + values[0] + " | Strength: " + values[1]);
return false;
}
private int[] getKeyData(int keyCode, KeyEvent event) {
int[] values = {0,0};
int action = event.getAction();
if(keyCode > 255) { // * get analog value (0,1,2,3,...,62,63,64) for the keyCode *
if(action == KeyEvent.ACTION_DOWN) {
values[0] = (int)(keyCode/100);
values[1] = (keyCode-(values[0]*100));
}
else if(action == KeyEvent.ACTION_UP) {
values[0] = (int)(keyCode/100);
values[1] = 0;
}
}
else { // * get digital value (0 or 64) for the keyCode *
if(action == KeyEvent.ACTION_DOWN) {
values[0] = keyCode;
values[1] = 64;
}
else if(action == KeyEvent.ACTION_UP) {
values[0] = keyCode;
values[1] = 0;
}
}
return values;
}
You need the "strength" value of the mapped and pressed key to multiply it with the moving object in the game.
I will release a new version of my "USB Joystick Center" tomorrow with the new Analog-Key option, and a "USB Joystick to Analog-Key" Demo too.
Update, here is the video:
http://www.youtube.com/watch?v=OVm5rqc9PlMgreetings
poke