Switch: Add argv loading
Vicki Pfau vi@endrift.com
Wed, 19 Sep 2018 19:21:49 -0700
1 files changed,
10 insertions(+),
1 deletions(-)
jump to
M
src/platform/switch/main.c
→
src/platform/switch/main.c
@@ -524,7 +524,16 @@ _mapKey(&runner.params.keyMap, AUTO_INPUT, KEY_DLEFT, GUI_INPUT_LEFT);
_mapKey(&runner.params.keyMap, AUTO_INPUT, KEY_DRIGHT, GUI_INPUT_RIGHT); audoutStartAudioOut(); - mGUIRunloop(&runner); + + if (argc > 1) { + size_t i; + for (i = 0; runner.keySources[i].id; ++i) { + mInputMapLoad(&runner.params.keyMap, runner.keySources[i].id, mCoreConfigGetInput(&runner.config)); + } + mGUIRun(&runner, argv[1]); + } else { + mGUIRunloop(&runner); + } glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo); glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);