[input] Set cbuf of correct imt context

This fixes key_demo bindings not working. Quite the face-palm.
This commit is contained in:
Bill Currie 2021-12-15 12:04:30 +09:00
parent cbf84d815f
commit 68de8615d6

View file

@ -304,6 +304,10 @@ IMT_SetContext (int ctx)
switcher = switcher->next) {
imt_switcher_update (switcher);
}
imt_t *imt = in_contexts.a[imt_current_context].active_imt;
Sys_MaskPrintf (SYS_input, "Switched to %s context, imt %s\n",
in_contexts.a[imt_current_context].name,
imt ? imt->name : 0);
}
void
@ -312,7 +316,7 @@ IMT_SetContextCbuf (int ctx, cbuf_t *cbuf)
if ((size_t) ctx >= in_contexts.size) {
Sys_Error ("IMT_SetContextCbuf: invalid context %d", ctx);
}
in_contexts.a[imt_current_context].cbuf = cbuf;
in_contexts.a[ctx].cbuf = cbuf;
}
static imt_t * __attribute__ ((pure))