Switch: Add argv loading

This commit is contained in:
Vicki Pfau 2018-09-19 19:21:49 -07:00
parent 5039d17a30
commit 1b9e1e8268
1 changed files with 10 additions and 1 deletions

View File

@ -524,7 +524,16 @@ int main(int argc, char* argv[]) {
_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);