1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Make sure config.font.name is not empty

This commit is contained in:
zilmar 2020-04-30 16:50:29 +09:30 committed by Sergey Lipskiy
parent e692509f6e
commit 3acf3b6f75

View File

@ -272,7 +272,11 @@ void COsdTab::SaveSettings()
config.onScreenDisplay.internalResolution = CButton(GetDlgItem(IDC_INTERNAL_RESOLUTION)).GetCheck() == BST_CHECKED ? 1 : 0;
config.onScreenDisplay.renderingResolution = CButton(GetDlgItem(IDC_RENDERING_RESOLUTION)).GetCheck() == BST_CHECKED ? 1 : 0;
config.font.name = FromUTF16(GetSelectedFont().c_str());
std::string SelectedFont = FromUTF16(GetSelectedFont().c_str());
if (!SelectedFont.empty())
config.font.name = SelectedFont;
if (config.font.name.empty())
config.font.name = "arial.ttf";
config.font.size = m_FontSizeSpin.GetPos();
config.font.color[0] = m_OsdColor.Red();