static struct TokenInfo system_setup_tokens[] =
{
+ {
+ TYPE_STRING,
+ &setup.system.sdl_renderdriver, "system.sdl_renderdriver"
+ },
{
TYPE_STRING,
&setup.system.sdl_videodriver, "system.sdl_videodriver"
si->input[i].key.drop = (i == 0 ? DEFAULT_KEY_DROP : KSYM_UNDEFINED);
}
+ si->system.sdl_renderdriver = getStringCopy(ARG_DEFAULT);
si->system.sdl_videodriver = getStringCopy(ARG_DEFAULT);
si->system.sdl_audiodriver = getStringCopy(ARG_DEFAULT);
si->system.audio_fragment_size = DEFAULT_AUDIO_FRAGMENT_SIZE;
void SDLInitVideoDisplay(void)
{
+ // set hint to select render driver as specified in setup config file
+ if (!strEqual(setup.system.sdl_renderdriver, ARG_DEFAULT))
+ SDL_SetHint(SDL_HINT_RENDER_DRIVER, setup.system.sdl_renderdriver);
+
// initialize SDL video
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
Error(ERR_EXIT, "SDL_InitSubSystem() failed: %s", SDL_GetError());
struct SetupSystemInfo
{
+ char *sdl_renderdriver;
char *sdl_videodriver;
char *sdl_audiodriver;
int audio_fragment_size;
getStringCopyNStatic(SDLGetRendererName(), driver_name_len);
DrawTextF(xstart1, ystart, font_text, "Render Driver");
- DrawTextF(xstart2, ystart, font_text, "%s", ARG_DEFAULT);
+ DrawTextF(xstart2, ystart, font_text, "%s", setup.system.sdl_renderdriver);
DrawTextF(xstart3, ystart, font_text, "%s", driver_name);
ystart += ystep_line;