windows: input: activate US keyboard layout for scancode mapping (#975)
This commit is contained in:
parent
9e0c72e45d
commit
845749d525
1 changed files with 8 additions and 0 deletions
|
|
@ -177,6 +177,7 @@ struct input_raw_t {
|
||||||
|
|
||||||
vigem_t *vigem;
|
vigem_t *vigem;
|
||||||
HKL keyboard_layout;
|
HKL keyboard_layout;
|
||||||
|
HKL active_layout;
|
||||||
};
|
};
|
||||||
|
|
||||||
input_t input() {
|
input_t input() {
|
||||||
|
|
@ -197,6 +198,13 @@ input_t input() {
|
||||||
raw.keyboard_layout = NULL;
|
raw.keyboard_layout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Activate layout for current process only
|
||||||
|
raw.active_layout = ActivateKeyboardLayout(raw.keyboard_layout, KLF_SETFORPROCESS);
|
||||||
|
if(!raw.active_layout) {
|
||||||
|
BOOST_LOG(warning) << "Unable to activate US English keyboard layout for scancode translation. Keyboard input may not work in games."sv;
|
||||||
|
raw.keyboard_layout = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue