mirror of
https://github.com/encounter/SDL.git
synced 2025-12-11 06:27:44 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user