Skip to content

Commit

Permalink
Mobile: Final touches on the input rework.
Browse files Browse the repository at this point in the history
  • Loading branch information
AShiningRay committed Nov 4, 2024
1 parent 436bae4 commit 11332ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/org/recompile/mobile/Mobile.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public static final int getMobileKey(int keycode, boolean isLibretro)
{
if(!isLibretro) { keycode = awtguiKeycodes[keycode]; } // Cast the received awt key to the correct value.

System.out.println("KeyPress:" + keyArray[keycode]);
//System.out.println("KeyPress:" + keyArray[keycode]); // Will be turned into a "Mobile.log()" call

// These keys are overridden by the modifier variables (comments simulate the Libretro interface with a NS Pro Controller)
if(lg)
Expand Down Expand Up @@ -294,6 +294,10 @@ public static final int getMobileKey(int keycode, boolean isLibretro)
case 11: return NOKIAKB_NUM3; // R
case 12: return NOKIAKB_STAR; // L2
case 13: return NOKIAKB_POUND; // R2
case 14: return NOKIAKB_NUM2; // Up
case 15: return NOKIAKB_NUM4; // Left
case 16: return NOKIAKB_NUM6; // Right
case 17: return NOKIAKB_NUM8; // Down
}
}
if(sagem)
Expand Down Expand Up @@ -340,6 +344,10 @@ public static final int getMobileKey(int keycode, boolean isLibretro)
case 11: return KEY_NUM3; // R
case 12: return KEY_STAR; // L2
case 13: return KEY_POUND; // R2
case 14: return KEY_NUM2; // Up
case 15: return KEY_NUM4; // Left
case 16: return KEY_NUM6; // Right
case 17: return KEY_NUM8; // Down
}

// If a matching key wasn't found, return 0;
Expand Down

0 comments on commit 11332ed

Please sign in to comment.