From: Rico Tzschichholz Date: Sat, 18 Mar 2023 11:40:55 +0000 (+0100) Subject: sdl2: Improve Keyboard.get_state() and drop custom implementation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=137f2768b91664ffd51871b049e2d2d38eece1f7;p=thirdparty%2Fvala.git sdl2: Improve Keyboard.get_state() and drop custom implementation Fixes https://gitlab.gnome.org/GNOME/vala/issues/1420 --- diff --git a/vapi/sdl2.vapi b/vapi/sdl2.vapi index d0a01095d..c8040acfb 100644 --- a/vapi/sdl2.vapi +++ b/vapi/sdl2.vapi @@ -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 ();