Skip to content

Commit

Permalink
heh
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisotura committed Sep 4, 2020
1 parent 3739e4d commit 94d12c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h2 align="center"><b>melonDS</b></h2>
<p align="center">
<a href="http://melonds.kuribo64.net/" alt="melonDS website"><img src="https://img.shields.io/badge/website-melonds.kuribo64.net-%2331352e.svg"></a>
<a href="http://melonds.kuribo64.net/downloads.php" alt="Release: 0.8.3"><img src="https://img.shields.io/badge/release-0.8.3-%235c913b.svg"></a>
<a href="http://melonds.kuribo64.net/downloads.php" alt="Release: 0.9"><img src="https://img.shields.io/badge/release-0.9-%235c913b.svg"></a>
<a href="https://www.gnu.org/licenses/gpl-3.0" alt="License: GPLv3"><img src="https://img.shields.io/badge/License-GPL%20v3-%23ff554d.svg"></a>
<a href="https://kiwiirc.com/client/irc.badnik.net/?nick=IRC-Source_?#melonds" alt="IRC channel: #melonds"><img src="https://img.shields.io/badge/IRC%20chat-%23melonds-%23dd2e44.svg"></a>
</p>
Expand Down
15 changes: 11 additions & 4 deletions src/frontend/qt_sdl/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,20 @@ FILE* OpenFile(const char* path, const char* mode, bool mustexist)
}

QIODevice::OpenMode qmode;
if (strlen(mode) > 1 && mode[0] == 'r' && mode[1] == '+') {
if (strlen(mode) > 1 && mode[0] == 'r' && mode[1] == '+')
{
qmode = QIODevice::OpenModeFlag::ReadWrite;
} else if (strlen(mode) > 1 && mode[0] == 'w' && mode[1] == '+') {
}
else if (strlen(mode) > 1 && mode[0] == 'w' && mode[1] == '+')
{
qmode = QIODevice::OpenModeFlag::Truncate | QIODevice::OpenModeFlag::ReadWrite;
} else if (mode[0] == 'w') {
}
else if (mode[0] == 'w')
{
qmode = QIODevice::OpenModeFlag::Truncate | QIODevice::OpenModeFlag::WriteOnly;
} else {
}
else
{
qmode = QIODevice::OpenModeFlag::ReadOnly;
}

Expand Down

0 comments on commit 94d12c6

Please sign in to comment.