Removed the preferLowPower parameter from SDL_CreateGPUDevice()

This commit is contained in:
Sam Lantinga
2024-08-29 16:35:28 -07:00
parent 3046335f28
commit 62f6e6b701
4 changed files with 3 additions and 9 deletions

View File

@@ -1091,7 +1091,7 @@ SDL_DYNAPI_PROC(size_t,SDL_wcsnlen,(const wchar_t *a, size_t b),(a,b),return)
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsnstr,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsstr,(const wchar_t *a, const wchar_t *b),(a,b),return)
SDL_DYNAPI_PROC(long,SDL_wcstol,(const wchar_t *a, wchar_t **b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_CreateGPUDevice,(SDL_GPUShaderFormat a, SDL_bool b, SDL_bool c, const char *d),(a,b,c,d),return)
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_CreateGPUDevice,(SDL_GPUShaderFormat a, SDL_bool b, const char *c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_CreateGPUDeviceWithProperties,(SDL_PropertiesID a),(a),return)
SDL_DYNAPI_PROC(void,SDL_DestroyGPUDevice,(SDL_GPUDevice *a),(a),)
SDL_DYNAPI_PROC(SDL_GPUDriver,SDL_GetGPUDriver,(SDL_GPUDevice *a),(a),return)

View File

@@ -394,7 +394,6 @@ static SDL_GPUDriver SDL_GPUSelectBackend(
SDL_GPUDevice *SDL_CreateGPUDevice(
SDL_GPUShaderFormat formatFlags,
SDL_bool debugMode,
SDL_bool preferLowPower,
const char *name)
{
SDL_GPUDevice *result;
@@ -418,7 +417,6 @@ SDL_GPUDevice *SDL_CreateGPUDevice(
SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOL, SDL_TRUE);
}
SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOL, debugMode);
SDL_SetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOL, preferLowPower);
SDL_SetStringProperty(props, SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING, name);
result = SDL_CreateGPUDeviceWithProperties(props);
SDL_DestroyProperties(props);
@@ -462,7 +460,7 @@ SDL_GPUDevice *SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props)
}
debugMode = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOL, SDL_TRUE);
preferLowPower = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOL, SDL_TRUE);
preferLowPower = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOL, SDL_FALSE);
gpudriver = SDL_GetHint(SDL_HINT_GPU_DRIVER);
if (gpudriver == NULL) {