mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-10 10:53:36 +02:00
Renamed GPU device creation properties
This commit is contained in:
@@ -1193,15 +1193,15 @@ static bool GPU_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
|
||||
goto error;
|
||||
}
|
||||
|
||||
bool debug = SDL_GetBooleanProperty(create_props, SDL_PROP_GPU_CREATEDEVICE_DEBUGMODE_BOOL, false);
|
||||
bool lowpower = SDL_GetBooleanProperty(create_props, SDL_PROP_GPU_CREATEDEVICE_PREFERLOWPOWER_BOOL, false);
|
||||
bool debug = SDL_GetBooleanProperty(create_props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOL, false);
|
||||
bool lowpower = SDL_GetBooleanProperty(create_props, SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOL, false);
|
||||
|
||||
// Prefer environment variables/hints if they exist, otherwise defer to properties
|
||||
debug = SDL_GetHintBoolean(SDL_HINT_RENDER_GPU_DEBUG, debug);
|
||||
lowpower = SDL_GetHintBoolean(SDL_HINT_RENDER_GPU_LOW_POWER, lowpower);
|
||||
|
||||
SDL_SetBooleanProperty(create_props, SDL_PROP_GPU_CREATEDEVICE_DEBUGMODE_BOOL, debug);
|
||||
SDL_SetBooleanProperty(create_props, SDL_PROP_GPU_CREATEDEVICE_PREFERLOWPOWER_BOOL, lowpower);
|
||||
SDL_SetBooleanProperty(create_props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOL, debug);
|
||||
SDL_SetBooleanProperty(create_props, SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOL, lowpower);
|
||||
|
||||
GPU_FillSupportedShaderFormats(create_props);
|
||||
data->device = SDL_CreateGPUDeviceWithProperties(create_props);
|
||||
|
||||
Reference in New Issue
Block a user