From 942aa7bd074243bad2c4551dc9c37bc3d45c80ee Mon Sep 17 00:00:00 2001 From: Vanfanel Date: Tue, 30 Mar 2021 11:41:26 +0200 Subject: [PATCH] [KMSDRM] No need to use an SDL_VideoDisplay pointer to access display index. --- src/video/kmsdrm/SDL_kmsdrmvulkan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvulkan.c b/src/video/kmsdrm/SDL_kmsdrmvulkan.c index 88e4e0e76..dae9bde2b 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvulkan.c +++ b/src/video/kmsdrm/SDL_kmsdrmvulkan.c @@ -208,8 +208,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, SDL_bool mode_found = SDL_FALSE; /* Get the display index from the display being used by the window. */ - SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); - int display_index = SDL_atoi(display->name); + int display_index = SDL_atoi(SDL_GetDisplayForWindow(window)->name); int i; /* Get the function pointers for the functions we will use. */ @@ -346,7 +345,7 @@ SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS, goto clean; } - /* Get the props of the videomodes for the first display. */ + /* Get the props of the videomodes for the display. */ modes_props = (VkDisplayModePropertiesKHR *) SDL_malloc(mode_count * sizeof(*modes_props)); vkGetDisplayModePropertiesKHR(gpu, displays_props[display_index].display,