From 06f63e7e831adb31f709d65b1d198f3f97e8b399 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 6 Apr 2024 12:10:52 +0100 Subject: [PATCH] [pxd] format --- pxd/src/gpu.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pxd/src/gpu.py b/pxd/src/gpu.py index e6c43953..9da8b63d 100644 --- a/pxd/src/gpu.py +++ b/pxd/src/gpu.py @@ -147,9 +147,11 @@ def __init__(self, cpu: CPU, debug: bool = False, headless: bool = False) -> Non sdl2.SDL_RenderSetLogicalSize(self.hw_renderer, size[0], size[1]) self.hw_buffer = sdl2.SDL_CreateTexture( self.hw_renderer, - sdl2.SDL_PixelFormatEnum.SDL_PIXELFORMAT_ABGR8888 - if cython.compiled - else sdl2.SDL_PIXELFORMAT_ABGR8888, + ( + sdl2.SDL_PixelFormatEnum.SDL_PIXELFORMAT_ABGR8888 + if cython.compiled + else sdl2.SDL_PIXELFORMAT_ABGR8888 + ), sdl2.SDL_TEXTUREACCESS_STREAMING, size[0], size[1], @@ -234,12 +236,16 @@ def tick(self) -> None: sdl2.SDL_UpdateTexture( self.hw_buffer, cython.NULL if cython.compiled else None, - self.buffer.pixels - if cython.compiled - else self.buffer.contents.pixels, - self.buffer.pitch - if cython.compiled - else self.buffer.contents.pitch, + ( + self.buffer.pixels + if cython.compiled + else self.buffer.contents.pixels + ), + ( + self.buffer.pitch + if cython.compiled + else self.buffer.contents.pitch + ), ) sdl2.SDL_RenderCopy( self.hw_renderer,