From 67649b3c4aef484ec9a920776f74be960cf45978 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Mon, 8 Feb 2021 10:13:24 +0100 Subject: [PATCH] early-access version 1427 --- README.md | 2 +- src/common/string_util.cpp | 14 -------------- src/core/hle/service/olsc/olsc.cpp | 13 ++++++++++++- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index a4b9415eb..76f2529d5 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1426. +This is the source code for early-access 1427. ## Legal Notice diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 4cba2aaa4..7b614ad89 100755 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -141,27 +141,13 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st } std::string UTF16ToUTF8(const std::u16string& input) { -#ifdef _MSC_VER - // Workaround for missing char16_t/char32_t instantiations in MSVC2017 - std::wstring_convert, __int16> convert; - std::basic_string<__int16> tmp_buffer(input.cbegin(), input.cend()); - return convert.to_bytes(tmp_buffer); -#else std::wstring_convert, char16_t> convert; return convert.to_bytes(input); -#endif } std::u16string UTF8ToUTF16(const std::string& input) { -#ifdef _MSC_VER - // Workaround for missing char16_t/char32_t instantiations in MSVC2017 - std::wstring_convert, __int16> convert; - auto tmp_buffer = convert.from_bytes(input); - return std::u16string(tmp_buffer.cbegin(), tmp_buffer.cend()); -#else std::wstring_convert, char16_t> convert; return convert.from_bytes(input); -#endif } #ifdef _WIN32 diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp index 4440135ed..e2ac71fa1 100755 --- a/src/core/hle/service/olsc/olsc.cpp +++ b/src/core/hle/service/olsc/olsc.cpp @@ -17,7 +17,7 @@ public: static const FunctionInfo functions[] = { {0, &OLSC::Initialize, "Initialize"}, {10, nullptr, "VerifySaveDataBackupLicenseAsync"}, - {13, nullptr, "GetSaveDataBackupSetting"}, + {13, &OLSC::GetSaveDataBackupSetting, "GetSaveDataBackupSetting"}, {14, &OLSC::SetSaveDataBackupSettingEnabled, "SetSaveDataBackupSettingEnabled"}, {15, nullptr, "SetCustomData"}, {16, nullptr, "DeleteSaveDataBackupSetting"}, @@ -52,6 +52,17 @@ private: rb.Push(RESULT_SUCCESS); } + void GetSaveDataBackupSetting(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_OLSC, "(STUBBED) called"); + + // backup_setting is set to 0 since real value is unknown + constexpr u64 backup_setting = 0; + + IPC::ResponseBuilder rb{ctx, 4}; + rb.Push(RESULT_SUCCESS); + rb.Push(backup_setting); + } + void SetSaveDataBackupSettingEnabled(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_OLSC, "(STUBBED) called");