From 0bac1e8ba3cd264eff74f8f7711c090e73529eee Mon Sep 17 00:00:00 2001 From: BatteRaquette581 <84451047+BatteRaquette581@users.noreply.github.com> Date: Thu, 20 Nov 2025 19:56:31 +0100 Subject: [PATCH 1/2] Remove unavailable and deprecated name_forindex function --- docs/reST/ref/sdl2_controller.rst | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/docs/reST/ref/sdl2_controller.rst b/docs/reST/ref/sdl2_controller.rst index 839a1f72a7..b6e9c684dc 100644 --- a/docs/reST/ref/sdl2_controller.rst +++ b/docs/reST/ref/sdl2_controller.rst @@ -102,16 +102,6 @@ events related to controllers. .. ## pygame._sdl2.controller.is_controller ## -.. function:: name_forindex - - | :sl:`Get the name of the controller` - | :sg:`name_forindex(index) -> name or None` - - Returns the name of controller, or None if there's no name or the - index is invalid. - - .. ## pygame._sdl2.controller.name_forindex ## - .. class:: Controller | :sl:`Create a new Controller object.` From 9483d3b68564332d02e3d70480294fd74cd3b9d5 Mon Sep 17 00:00:00 2001 From: BatteRaquette581 <84451047+BatteRaquette581@users.noreply.github.com> Date: Thu, 20 Nov 2025 19:57:30 +0100 Subject: [PATCH 2/2] Remove unavailable and deprecated name_forindex function --- src_c/doc/sdl2_controller_doc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src_c/doc/sdl2_controller_doc.h b/src_c/doc/sdl2_controller_doc.h index 4fff846ae6..2e7f1790ba 100644 --- a/src_c/doc/sdl2_controller_doc.h +++ b/src_c/doc/sdl2_controller_doc.h @@ -7,7 +7,6 @@ #define DOC_SDL2_CONTROLLER_GETEVENTSTATE "get_eventstate() -> bool\nGets the current state of events related to controllers" #define DOC_SDL2_CONTROLLER_GETCOUNT "get_count() -> int\nGet the number of joysticks connected" #define DOC_SDL2_CONTROLLER_ISCONTROLLER "is_controller(index) -> bool\nCheck if the given joystick is supported by the game controller interface" -#define DOC_SDL2_CONTROLLER_NAMEFORINDEX "name_forindex(index) -> name or None\nGet the name of the controller" #define DOC_SDL2_CONTROLLER_CONTROLLER "Controller(index) -> Controller\nCreate a new Controller object." #define DOC_SDL2_CONTROLLER_CONTROLLER_INIT "init() -> None\nInitialize the Controller" #define DOC_SDL2_CONTROLLER_CONTROLLER_QUIT "quit() -> None\nuninitialize the Controller"