History

{x11,wayland}_common: convert dead code to static sanity check

Kacper Michajłow committed 1 year ago

Commit 41d03dc1 parent dd107a12 files · +6 −8Browse files

Unified · Split

2 files
  1. video/out/wayland_common.c +3 −4
  2. video/out/x11_common.c +3 −4
video/out/wayland_common.c+3−4
@@ -2423,11 +2423,10 @@ static int lookupkey(int key) · 2422 unmodified lines
2423 mpkey = lookup_keymap_table(keymap, key);2423 mpkey = lookup_keymap_table(keymap, key);
2424 2424
2425 // XFree86 keysym range; typically contains obscure "extra" keys2425 // XFree86 keysym range; typically contains obscure "extra" keys
2426 if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF) {2426 static_assert(MP_KEY_UNKNOWN_RESERVED_START + (0x1008FFFF - 0x10080000) <=
2427 MP_KEY_UNKNOWN_RESERVED_LAST, "");
2428 if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF)
2427 mpkey = MP_KEY_UNKNOWN_RESERVED_START + (key - 0x10080000);2429 mpkey = MP_KEY_UNKNOWN_RESERVED_START + (key - 0x10080000);
2428 if (mpkey > MP_KEY_UNKNOWN_RESERVED_LAST)
2429 mpkey = 0;
2430 }
2431 2430
2432 return mpkey;2431 return mpkey;
2433}2432}
video/out/x11_common.c+3−4
@@ -831,11 +831,10 @@ static int vo_x11_lookupkey(int key) · 830 unmodified lines
831 mpkey = lookup_keymap_table(keymap, key);831 mpkey = lookup_keymap_table(keymap, key);
832 832
833 // XFree86 keysym range; typically contains obscure "extra" keys833 // XFree86 keysym range; typically contains obscure "extra" keys
834 if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF) {834 static_assert(MP_KEY_UNKNOWN_RESERVED_START + (0x1008FFFF - 0x10080000) <=
835 MP_KEY_UNKNOWN_RESERVED_LAST, "");
836 if (!mpkey && key >= 0x10080001 && key <= 0x1008FFFF)
835 mpkey = MP_KEY_UNKNOWN_RESERVED_START + (key - 0x10080000);837 mpkey = MP_KEY_UNKNOWN_RESERVED_START + (key - 0x10080000);
836 if (mpkey > MP_KEY_UNKNOWN_RESERVED_LAST)
837 mpkey = 0;
838 }
839 838
840 return mpkey;839 return mpkey;
841}840}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t