From c889d03829e465e00dd082746dff72a27763aaf0 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Tue, 9 Dec 2008 23:27:08 +0000 Subject: [PATCH] Use MIME type as backup to extension, just in case extension fails. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1470 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/ISOProperties.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index dd4298929e..abac431354 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -585,10 +585,14 @@ void CISOProperties::OnEditConfig(wxCommandEvent& WXUNUSED (event)) SaveGameConfig(); wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("ini")); - if(filetype == NULL) + if(filetype == NULL) // From extension failed, trying with MIME type now { - PanicAlert("Filetype 'ini' is unknown! Will not open!"); - return; + filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_("text/plain")); + if(filetype == NULL) // MIME type failed, aborting mission + { + PanicAlert("Filetype 'ini' is unknown! Will not open!"); + return; + } } wxString OpenCommand; OpenCommand = filetype->GetOpenCommand(wxString::FromAscii(GameIniFile.c_str()));