Added SDL_DXGIGetOutputInfo which returns the adapter and output indices that are used to create DX10 and DX11 devices and swap chains on a particular display.
CR: SamL
This commit is contained in:
parent
e16a129e19
commit
2d76dd6a5d
5 changed files with 100 additions and 2 deletions
|
@ -706,6 +706,7 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
|||
Uint32 Rmask, Gmask, Bmask, Amask;
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
int adapterIndex = 0;
|
||||
int outputIndex = 0;
|
||||
#endif
|
||||
n = SDL_GetNumVideoDisplays();
|
||||
fprintf(stderr, "Number of displays: %d\n", n);
|
||||
|
@ -761,9 +762,13 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
|||
}
|
||||
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
/* Print the adapter index */
|
||||
/* Print the D3D9 adapter index */
|
||||
adapterIndex = SDL_Direct3D9GetAdapterIndex( i );
|
||||
fprintf( stderr, "Adapter Index: %d", adapterIndex );
|
||||
fprintf( stderr, "D3D9 Adapter Index: %d", adapterIndex );
|
||||
|
||||
/* Print the DXGI adapter and output indices */
|
||||
SDL_DXGIGetOutputInfo(i, &adapterIndex, &outputIndex);
|
||||
fprintf( stderr, "DXGI Adapter Index: %d Output Index: %d", adapterIndex, outputIndex );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue