mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-29 07:59:11 +00:00
Don't define backends if SDL_GPU_DISABLED is set
This commit is contained in:
parent
8481d1a12b
commit
bc9780299c
1 changed files with 6 additions and 0 deletions
|
@ -150,6 +150,7 @@
|
||||||
|
|
||||||
// Drivers
|
// Drivers
|
||||||
|
|
||||||
|
#ifndef SDL_GPU_DISABLED
|
||||||
static const SDL_GPUBootstrap *backends[] = {
|
static const SDL_GPUBootstrap *backends[] = {
|
||||||
#ifdef SDL_GPU_METAL
|
#ifdef SDL_GPU_METAL
|
||||||
&MetalDriver,
|
&MetalDriver,
|
||||||
|
@ -165,6 +166,7 @@ static const SDL_GPUBootstrap *backends[] = {
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
#endif // !SDL_GPU_DISABLED
|
||||||
|
|
||||||
// Internal Utility Functions
|
// Internal Utility Functions
|
||||||
|
|
||||||
|
@ -547,7 +549,11 @@ void SDL_DestroyGPUDevice(SDL_GPUDevice *device)
|
||||||
|
|
||||||
int SDL_GetNumGPUDrivers(void)
|
int SDL_GetNumGPUDrivers(void)
|
||||||
{
|
{
|
||||||
|
#ifndef SDL_GPU_DISABLED
|
||||||
return SDL_arraysize(backends) - 1;
|
return SDL_arraysize(backends) - 1;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * SDL_GetGPUDriver(int index)
|
const char * SDL_GetGPUDriver(int index)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue