diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-09-04 13:41:51 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2020-09-04 13:41:51 +0200 |
commit | 94d12c68b3cc8240d52c4123cf804641fa66b40a (patch) | |
tree | 62b021643fb48852ac5f5458a49aee4ddae92d41 | |
parent | 3739e4dd670145aa7c555c9dd372efc32a93a676 (diff) |
heh
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/frontend/qt_sdl/Platform.cpp | 15 |
2 files changed, 12 insertions, 5 deletions
@@ -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> diff --git a/src/frontend/qt_sdl/Platform.cpp b/src/frontend/qt_sdl/Platform.cpp index b9d3235..a716feb 100644 --- a/src/frontend/qt_sdl/Platform.cpp +++ b/src/frontend/qt_sdl/Platform.cpp @@ -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; } |