Skip to content

Commit

Permalink
Set default video output to D3D/OpenGL if available
Browse files Browse the repository at this point in the history
  • Loading branch information
maron2000 committed Oct 31, 2023
1 parent 2c08595 commit 851a5dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/output/output_ttf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void GFX_SelectFontByPoints(int ptsize) {

void SetOutputSwitch(const char *outputstr) {
#if C_DIRECT3D
if (!strcasecmp(outputstr, "direct3d"))
if (!strcasecmp(outputstr, "direct3d") || !strcasecmp(outputstr, "auto"))
switchoutput = 6;
else
#endif
Expand All @@ -610,7 +610,7 @@ void SetOutputSwitch(const char *outputstr) {
switchoutput = 5;
else if (!strcasecmp(outputstr, "openglnb"))
switchoutput = 4;
else if (!strcasecmp(outputstr, "opengl")||!strcasecmp(outputstr, "openglnq"))
else if (!strcasecmp(outputstr, "opengl")||!strcasecmp(outputstr, "openglnq") || !strcasecmp(outputstr, "auto"))
switchoutput = 3;
else
#endif
Expand All @@ -624,7 +624,7 @@ void OUTPUT_TTF_Select(int fsize) {
if (!initttf&&TTF_Init()) { // Init SDL-TTF
std::string message = "Could not init SDL-TTF: " + std::string(SDL_GetError());
systemmessagebox("Error", message.c_str(), "ok","error", 1);
sdl.desktop.want_type = SCREEN_SURFACE;
change_output(switchoutput == -1 ? 0 : switchoutput);
return;
}
int fontSize = 0;
Expand Down

0 comments on commit 851a5dc

Please sign in to comment.