windows: input: activate US keyboard layout for scancode mapping (#975)
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user