mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-11 10:24:43 +00:00
Add a result != S_OK check
This commit is contained in:
parent
044bd4b43d
commit
67e2b57e0f
@ -424,27 +424,26 @@ void GameSettingsScreen::CreateViews() {
|
||||
else {
|
||||
if (installed && (result == S_OK)) {
|
||||
std::ifstream inputFile(ConvertUTF8ToWString(installedFile));
|
||||
if (!inputFile.fail() && inputFile.is_open()) {
|
||||
SavePathInMyDocumentChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathMydoc);
|
||||
std::string tempString;
|
||||
|
||||
std::getline(inputFile, tempString);
|
||||
|
||||
// Skip UTF-8 encoding bytes if there are any. There are 3 of them.
|
||||
if (tempString.substr(0, 3) == "\xEF\xBB\xBF")
|
||||
tempString = tempString.substr(3);
|
||||
if (tempString == ""){
|
||||
SavePathInMyDocumentChoice->SetEnabled(true);
|
||||
if (!inputFile.fail() && inputFile.is_open()) {
|
||||
SavePathInMyDocumentChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathMydoc);
|
||||
std::string tempString;
|
||||
std::getline(inputFile, tempString);
|
||||
|
||||
// Skip UTF-8 encoding bytes if there are any. There are 3 of them.
|
||||
if (tempString.substr(0, 3) == "\xEF\xBB\xBF")
|
||||
if (tempString == ""){
|
||||
SavePathInMyDocumentChoice->OnClick.Handle(this, &GameSettingsScreen::OnSavePathMydoc);
|
||||
}
|
||||
else {
|
||||
installed = false;
|
||||
otherinstalled = true;
|
||||
SavePathInOtherChoice->SetEnabled(true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
installed = false;
|
||||
otherinstalled = true;
|
||||
SavePathInOtherChoice->SetEnabled(true);
|
||||
}
|
||||
}
|
||||
inputFile.close();
|
||||
inputFile.close();
|
||||
}
|
||||
else if (result != S_OK)
|
||||
SavePathInMyDocumentChoice->SetEnabled(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user