Moved D3D_LoadDLL and SDL_Direct3D9GetAdapterIndex to SDL_windowswindow.c at Jorgen's insistence. That file is wrapped in a more appropriate define check so it will work if somebody builds a binary without D3D support.
Added a reference to SDL_Direct3D9GetAdapterIndex to SDL_test_common.c so SDL will fail to compile if the new symbol isn't included properly. CR: Jorgen
This commit is contained in:
parent
a7429dfa22
commit
a759ac24a1
4 changed files with 92 additions and 69 deletions
|
@ -701,7 +701,9 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
|||
SDL_DisplayMode mode;
|
||||
int bpp;
|
||||
Uint32 Rmask, Gmask, Bmask, Amask;
|
||||
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
int adapterIndex = 0;
|
||||
#endif
|
||||
n = SDL_GetNumVideoDisplays();
|
||||
fprintf(stderr, "Number of displays: %d\n", n);
|
||||
for (i = 0; i < n; ++i) {
|
||||
|
@ -754,6 +756,12 @@ SDLTest_CommonInit(SDLTest_CommonState * state)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if SDL_VIDEO_DRIVER_WINDOWS
|
||||
/* Print the adapter index */
|
||||
adapterIndex = SDL_Direct3D9GetAdapterIndex( i );
|
||||
fprintf( stderr, "Adapter Index: %d", adapterIndex );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue