Commit 68be0132 authored by Gargaj's avatar Gargaj
Browse files

Fix font selection / detection flow (fixes #103)

parent e049aa74
......@@ -104,15 +104,17 @@ int main(int argc, const char *argv[])
std::map<int,std::string> midiRoutes;
const char * szDefaultFontPath = Misc::GetDefaultFontPath();
if (!szDefaultFontPath)
{
printf( "Misc::GetDefaultFontPath couldn't find ANY default fonts!\n" );
return -1;
}
SHADEREDITOR_OPTIONS editorOptions;
editorOptions.nFontSize = 16;
editorOptions.sFontPath = szDefaultFontPath;
if ( !szDefaultFontPath )
{
printf( "Misc::GetDefaultFontPath couldn't find ANY default fonts!\n" );
}
else
{
editorOptions.sFontPath = szDefaultFontPath;
}
editorOptions.nOpacity = 0xC0;
editorOptions.bUseSpacesForTabs = true;
editorOptions.nTabSize = 2;
......@@ -208,7 +210,7 @@ int main(int argc, const char *argv[])
}
Capture::LoadSettings( options );
}
else if (!editorOptions.sFontPath.size())
if (!editorOptions.sFontPath.size())
{
printf("Couldn't find any of the default fonts. Please specify one in config.json\n");
return -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment