mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-03-17 16:20:52 +00:00
windows: input: activate US keyboard layout for scancode mapping (#975)
This commit is contained in:
parent
9e0c72e45d
commit
845749d525
@ -177,6 +177,7 @@ struct input_raw_t {
|
||||
|
||||
vigem_t *vigem;
|
||||
HKL keyboard_layout;
|
||||
HKL active_layout;
|
||||
};
|
||||
|
||||
input_t input() {
|
||||
@ -197,6 +198,13 @@ input_t input() {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user