Skip to content

Commit 87ccc69

Browse files
SerguncheoussKarim Mreisi
authored andcommitted
Allow use keyboard by dpad or controller.
1 parent c1e4456 commit 87ccc69

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/src/main/java/com/limelight/Game.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ protected void onCreate(Bundle savedInstanceState) {
213213
// Inflate the content
214214
setContentView(R.layout.activity_game);
215215

216+
// Hack: allows use keyboard by dpad or controller
217+
getWindow().getDecorView().findViewById(android.R.id.content).setFocusable(true);
218+
216219
// Start the spinner
217220
spinner = SpinnerDialog.displayDialog(this, getResources().getString(R.string.conn_establishing_title),
218221
getResources().getString(R.string.conn_establishing_msg), true);
@@ -1463,6 +1466,10 @@ private TouchContext getTouchContext(int actionIndex)
14631466
@Override
14641467
public void toggleKeyboard() {
14651468
LimeLog.info("Toggling keyboard overlay");
1469+
1470+
// Hack: allows use keyboard by dpad or controller
1471+
streamView.clearFocus();
1472+
14661473
InputMethodManager inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
14671474
inputManager.toggleSoftInput(0, 0);
14681475
}

0 commit comments

Comments
 (0)