Skip to content

Commit

Permalink
Merge pull request #3145 from pygame-community/ankith26-sdl3-compat
Browse files Browse the repository at this point in the history
SDL3: compile rect, bufferproxy, math, newbuffer, geometry
  • Loading branch information
bilhox authored Oct 6, 2024
2 parents 63eba62 + 0371abd commit e2704e6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ sdl_image = '@0@_image'.format(sdl)

if sdl_api == 3
add_global_arguments('-DPG_SDL3=1', language: 'c')
add_global_arguments('-DSDL_ENABLE_OLD_NAMES=1', language: 'c')
endif

pg_inc_dirs = []
Expand Down
1 change: 1 addition & 0 deletions src_c/bufferproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "pgcompat.h"
#include "pgbufferproxy.h"
#include "doc/bufferproxy_doc.h"
#include <stddef.h>

#if SDL_BYTEORDER == SDL_LIL_ENDIAN
#define BUFPROXY_MY_ENDIAN '<'
Expand Down
1 change: 1 addition & 0 deletions src_c/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "pygame.h"
#include "pgcompat.h"
#include <stddef.h>

typedef struct {
double x, y, r;
Expand Down
15 changes: 0 additions & 15 deletions src_c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ mouse = py.extension_module(
)
endif

# TODO: support SDL3
if sdl_api != 3
rect = py.extension_module(
'rect',
['rect.c', 'pgcompat_rect.c'],
Expand All @@ -94,7 +92,6 @@ rect = py.extension_module(
install: true,
subdir: pg,
)
endif

# TODO: support SDL3
if sdl_api != 3
Expand Down Expand Up @@ -275,8 +272,6 @@ mask = py.extension_module(
)
endif

# TODO: support SDL3
if sdl_api != 3
bufferproxy = py.extension_module(
'bufferproxy',
'bufferproxy.c',
Expand All @@ -285,7 +280,6 @@ bufferproxy = py.extension_module(
install: true,
subdir: pg,
)
endif

# TODO: support SDL3
if sdl_api != 3
Expand All @@ -299,8 +293,6 @@ pixelarray = py.extension_module(
)
endif

# TODO: support SDL3
if sdl_api != 3
math = py.extension_module(
'math',
'math.c',
Expand All @@ -309,7 +301,6 @@ math = py.extension_module(
install: true,
subdir: pg,
)
endif

# TODO: support SDL3
if sdl_api != 3
Expand All @@ -323,8 +314,6 @@ pixelcopy = py.extension_module(
)
endif

# TODO: support SDL3
if sdl_api != 3
newbuffer = py.extension_module(
'newbuffer',
'newbuffer.c',
Expand All @@ -333,7 +322,6 @@ newbuffer = py.extension_module(
install: true,
subdir: pg,
)
endif

# new/experimental/uncommon stuff, but built by default
# TODO: support SDL3
Expand All @@ -348,8 +336,6 @@ system = py.extension_module(
)
endif

# TODO: support SDL3
if sdl_api != 3
geometry = py.extension_module(
'geometry',
'geometry.c',
Expand All @@ -358,7 +344,6 @@ geometry = py.extension_module(
install: true,
subdir: pg,
)
endif

# TODO: support SDL3
if sdl_api != 3
Expand Down

0 comments on commit e2704e6

Please sign in to comment.