]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
sdl2: Improve Keyboard.get_state() and drop custom implementation
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 18 Mar 2023 11:40:55 +0000 (12:40 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 18 Mar 2023 11:40:55 +0000 (12:40 +0100)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1420

vapi/sdl2.vapi

index d0a01095dfc43f2f2a4cdacee7dafeba0a480a14..c8040acfbf482ef518fb3f646e5a3f27f87422fe 100644 (file)
@@ -3561,16 +3561,7 @@ namespace SDL {
                        public static Video.Window get_focus ();
 
                        [CCode (cname = "SDL_GetKeyboardState")]
-                       public static unowned uint8* get_raw_state (out int numkeys = null);
-
-                       [CCode (cname = "vala_get_keyboard_state")]
-                       public static unowned bool[] get_state () {
-                               size_t len;
-                               uint8* raw = get_raw_state (out len);
-                               unowned bool[] retval = (bool[])raw;
-                               retval.length = (int)len;
-                               return retval;
-                       }
+                       public static unowned uint8[] get_state ();
 
                        [CCode (cname = "SDL_GetModState")]
                        public static Input.Keymod get_modifierstate ();