From 77612b600cb33520281e427804040f44c5f5d92f Mon Sep 17 00:00:00 2001
From: Cameron Gutman <[EMAIL REDACTED]>
Date: Sat, 30 Mar 2024 21:07:39 -0500
Subject: [PATCH] Fix ID/index mismatch in SDL_Direct3D9GetAdapterIndex() and
SDL_DXGIGetOutputInfo()
---
src/sdl2_compat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 41d6bf6..c4b5a4c 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -7948,13 +7948,13 @@ SDL_SetWindowsMessageHook(SDL2_WindowsMessageHook callback, void *userdata)
DECLSPEC int SDLCALL
SDL_Direct3D9GetAdapterIndex(int displayIndex)
{
- return SDL3_Direct3D9GetAdapterIndex((SDL_DisplayID)displayIndex);
+ return SDL3_Direct3D9GetAdapterIndex(Display_IndexToID(displayIndex));
}
DECLSPEC SDL_bool SDLCALL
SDL_DXGIGetOutputInfo(int displayIndex, int *adapterIndex, int *outputIndex)
{
- return SDL3_DXGIGetOutputInfo((SDL_DisplayID)displayIndex, adapterIndex, outputIndex);
+ return SDL3_DXGIGetOutputInfo(Display_IndexToID(displayIndex), adapterIndex, outputIndex);
}
DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer *renderer)