mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 01:38:27 +00:00
Added SDL_HINT_VULKAN_DISPLAY
This commit is contained in:
parent
997df06320
commit
3669d1e76a
2 changed files with 12 additions and 1 deletions
|
@ -3373,6 +3373,17 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_VITA_TOUCH_MOUSE_DEVICE"
|
||||
|
||||
/**
|
||||
* A variable overriding the display index used in SDL_Vulkan_CreateSurface()
|
||||
*
|
||||
* The display index starts at 0, which is the default.
|
||||
*
|
||||
* This hint should be set before calling SDL_Vulkan_CreateSurface()
|
||||
*
|
||||
* \since This hint is available since SDL 3.0.0.
|
||||
*/
|
||||
#define SDL_HINT_VULKAN_DISPLAY "SDL_VULKAN_DISPLAY"
|
||||
|
||||
/**
|
||||
* Specify the Vulkan library to load.
|
||||
*
|
||||
|
|
|
@ -209,7 +209,7 @@ int SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_,
|
|||
SDL_SetError(VK_KHR_DISPLAY_EXTENSION_NAME " extension is not enabled in the Vulkan instance.");
|
||||
goto error;
|
||||
}
|
||||
chosenDisplayId = SDL_getenv("SDL_VULKAN_DISPLAY");
|
||||
chosenDisplayId = SDL_GetHint(SDL_HINT_VULKAN_DISPLAY);
|
||||
if (chosenDisplayId) {
|
||||
displayId = SDL_atoi(chosenDisplayId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue