SDL_GetDirect3D9AdapterIndex(3)
π SDL_GetDirect3D9AdapterIndex π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's called SDL_GetDirect3D9AdapterIndex and it is literally your plug for matching a display to its D3D9 adapter index π¦
β¨ NAME β¨
SDL_GetDirect3D9AdapterIndex β get the D3D9 adapter index that matches the specified display π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_system.h>
int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);
π DESCRIPTION π
so here's the tea π the adapter index you get back can be passed straight into IDirect3D9::CreateDevice, and that's the thing that controls on which monitor a full screen application will appear. yes, the whole "which screen am I taking over" situation. that's the vibe. no cap π₯
π FUNCTION PARAMETERS π
displayIDβ the instance of the display to query. like, which one are we talking about bestie, be specific π«Ά
β RETURN VALUE β
Returns the D3D9 adapter index on success, or -1 on failure π and if you got the -1, go call SDL_GetError() for more information, she'll tell you what went wrong.
not the -1 bestie, that's the "something's off" signal fr fr
π AVAILABILITY π
this function is available since SDL 3.2.0. it's not ancient, it's just iconic π
that's the whole page, go forth and create your device β¨
Simple Directmedia Layer β SDL 3.4.18 β SDL_GetDirect3D9AdapterIndex(3) π mwah, stay slaying, read the docs, hydrate πΈπ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms