Skip to content

Commit 18c27fd

Browse files
SerguncheoussKarim Mreisi
authored andcommitted
Allow use keyboard by dpad or controller.
1 parent c8e20c8 commit 18c27fd

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
@@ -212,6 +212,9 @@ protected void onCreate(Bundle savedInstanceState) {
212212
// Inflate the content
213213
setContentView(R.layout.activity_game);
214214

215+
// Hack: allows use keyboard by dpad or controller
216+
getWindow().getDecorView().findViewById(android.R.id.content).setFocusable(true);
217+
215218
// Start the spinner
216219
spinner = SpinnerDialog.displayDialog(this, getResources().getString(R.string.conn_establishing_title),
217220
getResources().getString(R.string.conn_establishing_msg), true);
@@ -1442,6 +1445,10 @@ private TouchContext getTouchContext(int actionIndex)
14421445
@Override
14431446
public void toggleKeyboard() {
14441447
LimeLog.info("Toggling keyboard overlay");
1448+
1449+
// Hack: allows use keyboard by dpad or controller
1450+
streamView.clearFocus();
1451+
14451452
InputMethodManager inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
14461453
inputManager.toggleSoftInput(0, 0);
14471454
}

0 commit comments

Comments
 (0)