Skip to content

Commit 97a3718

Browse files
committed
Merge remote-tracking branch 'upstream/main' into surface-refactor
2 parents 8010a7e + 39c61e4 commit 97a3718

26 files changed

+227
-113
lines changed

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
version: "0.5.26"
119119

120120
- name: Build and test wheels
121-
uses: pypa/cibuildwheel@v2.23.2
121+
uses: pypa/cibuildwheel@v3.0.1
122122

123123
- uses: actions/upload-artifact@v4
124124
with:

.github/workflows/build-manylinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
7575
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
7676

77-
uses: pypa/cibuildwheel@v2.23.2
77+
uses: pypa/cibuildwheel@v3.0.1
7878

7979
# We upload the generated files under github actions assets
8080
- name: Upload dist

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
version: "0.5.26"
4444

4545
- name: Build and test wheels
46-
uses: pypa/cibuildwheel@v2.23.2
46+
uses: pypa/cibuildwheel@v3.0.1
4747

4848
- uses: actions/upload-artifact@v4
4949
with:

buildconfig/stubs/pygame/_sdl2/controller.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import final
22

33
from pygame.joystick import JoystickType
4+
from pygame.typing import ColorLike
45

56
def init() -> None: ...
67
def get_init() -> bool: ...
@@ -30,3 +31,4 @@ class Controller:
3031
self, low_frequency: float, high_frequency: float, duration: int
3132
) -> bool: ...
3233
def stop_rumble(self) -> None: ...
34+
def set_led(self, color: ColorLike, /) -> bool: ...

buildconfig/stubs/pygame/joystick.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import final
22

3+
from pygame.typing import ColorLike
34
from typing_extensions import deprecated # added in 3.13
45

56
def init() -> None: ...
@@ -31,6 +32,7 @@ class JoystickType:
3132
self, low_frequency: float, high_frequency: float, duration: int
3233
) -> bool: ...
3334
def stop_rumble(self) -> None: ...
35+
def set_led(self, color: ColorLike, /) -> bool: ...
3436

3537
# according to the current implementation, Joystick is a function that returns
3638
# a JoystickType instance. In the future, when the C implementation is fixed to

docs/reST/ref/joystick.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,22 @@ variable. See :ref:`environment variables <environment-variables>` for more deta
356356

357357
.. ## Joystick.stop_rumble ##
358358
359+
.. method:: set_led
360+
361+
| :sl:`Set the LED color of the joystick`
362+
| :sg:`set_led(color_arg) -> bool`
363+
364+
Set the color of the LED on the joystick. The argument is a
365+
``pygame.Color``-compatible value (alpha being ignored). The
366+
joystick's LED, if it has one, will be set to the input color.
367+
If the joystick does not have an addressable LED, then this
368+
method will do nothing and return False. Returns True if the
369+
LED was set successfully.
370+
371+
.. versionadded:: 2.5.6
372+
373+
.. ## Joystick.set_led ##
374+
359375
.. ## pygame.joystick.Joystick ##
360376
361377
.. ## pygame.joystick ##

docs/reST/ref/math.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Conversion can be combined with swizzling or slicing to create a new order
119119

120120
The formula is:
121121

122-
``a * value + (1 - value) * b``.
122+
``a + (b - a) * value``.
123123

124124
.. versionadded:: 2.4.0
125125

docs/reST/ref/mixer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ The following file formats are supported
597597
598598
Set the position (angle, distance) of a playing channel.
599599

600-
`angle`: Angle is in degrees.
600+
`angle`: Angle in degrees.
601601

602602
`distance`: Range from 0 to 255.
603603

docs/reST/ref/sdl2_controller.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,20 @@ events related to controllers.
288288

289289
.. ## Controller.stop_rumble ##
290290
291+
.. method:: set_led
292+
293+
| :sl:`Set the LED color of the controller`
294+
| :sg:`set_led(color_arg) -> bool`
295+
296+
Set the color of the LED on the controller. The argument is a
297+
``pygame.Color``-compatible value (alpha being ignored). The
298+
controller's LED, if it has one, will be set to the input color.
299+
If the controller does not have an addressable LED, then this
300+
method will do nothing and return False. Returns True if the
301+
LED was set successfully.
302+
303+
.. versionadded:: 2.5.6
304+
305+
.. ## Controller.set_led ##
306+
291307
.. ## pygame._sdl2.controller ##

docs/reST/ref/sdl2_video.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@
378378
| :sl:`Get or set the logical Renderer size (a device independent resolution for rendering)`
379379
| :sg:`logical_size -> (int width, int height)`
380380
381+
Note: When the rendering target is the main window, and ``logical_size``
382+
has not been set before, it will contain ``(0, 0)`` and not the size of
383+
the window.
384+
381385
.. attribute:: scale
382386

383387
| :sl:`Get the drawing scale for the current rendering target`

0 commit comments

Comments
 (0)