Parse XPM without SDL_image
We encounter some problems with SDL2_image on MSYS2 (Windows), so implement our own XPM parsing which does not depend on SDL_image. The input XPM is considered safe (it's in our source repo), so do not check XPM format errors. This implies that read_xpm() is not safe to call on any unsafe input. Although less straightforward, use SDL_CreateRGBSurfaceFrom() instead of SDL_CreateRGBSurfaceWithFormatFrom() because it is available with SDL versions older than 2.0.5.
This commit is contained in:
@@ -13,6 +13,7 @@ src = [
|
||||
'src/scrcpy.c',
|
||||
'src/server.c',
|
||||
'src/strutil.c',
|
||||
'src/tinyxpm.c',
|
||||
]
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
@@ -26,7 +27,6 @@ dependencies = [
|
||||
dependency('libavcodec'),
|
||||
dependency('libavutil'),
|
||||
dependency('sdl2'),
|
||||
dependency('SDL2_image'),
|
||||
dependency('SDL2_net'),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user