From 94d12c68b3cc8240d52c4123cf804641fa66b40a Mon Sep 17 00:00:00 2001 From: Arisotura Date: Fri, 4 Sep 2020 13:41:51 +0200 Subject: [PATCH] heh --- README.md | 2 +- src/frontend/qt_sdl/Platform.cpp | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cc53fa84..61532a98 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

melonDS

- +

diff --git a/src/frontend/qt_sdl/Platform.cpp b/src/frontend/qt_sdl/Platform.cpp index b9d32353..a716feb6 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; }