mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-03-30 16:20:40 +00:00
Fix not responding to key modifiers on moonlight-embedded
This commit is contained in:
parent
5495c8367a
commit
0c5daa44a1
@ -303,6 +303,20 @@ void repeat_key(short key_code) {
|
||||
task_id = task_pool.pushDelayed(repeat_key, config::input.key_repeat_period, key_code).task_id;
|
||||
}
|
||||
|
||||
short map_keycode(short keycode) {
|
||||
keycode &= 0x00FF;
|
||||
|
||||
switch(keycode) {
|
||||
case 0x10:
|
||||
return 0xA0;
|
||||
case 0x11:
|
||||
return 0xA2;
|
||||
case 0x12:
|
||||
return 0xA4;
|
||||
}
|
||||
|
||||
return keycode;
|
||||
}
|
||||
void passthrough(std::shared_ptr<input_t> &input, PNV_KEYBOARD_PACKET packet) {
|
||||
auto constexpr BUTTON_RELEASED = 0x04;
|
||||
|
||||
@ -330,7 +344,8 @@ void passthrough(std::shared_ptr<input_t> &input, PNV_KEYBOARD_PACKET packet) {
|
||||
}
|
||||
|
||||
pressed = !release;
|
||||
platf::keyboard(platf_input, packet->keyCode & 0x00FF, release);
|
||||
|
||||
platf::keyboard(platf_input, map_keycode(packet->keyCode), release);
|
||||
}
|
||||
|
||||
void passthrough(PNV_SCROLL_PACKET packet) {
|
||||
|
@ -112,7 +112,7 @@ int main(int argc, char *argv[]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(config::sunshine.min_log_level >= 2) {
|
||||
if(config::sunshine.min_log_level >= 1) {
|
||||
av_log_set_level(AV_LOG_QUIET);
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user