mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-02 16:32:55 +00:00
Add WiiSaveBanner class
This class is similar to the BannerLoaderWii class that was
removed in ee694e32
.
This commit is contained in:
parent
c8710d0861
commit
5a6d90900e
12 changed files with 150 additions and 51 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
|
@ -576,3 +577,11 @@ std::string UTF16ToUTF8(const std::wstring& input)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
std::string UTF16BEToUTF8(const char16_t* str, size_t max_size)
|
||||
{
|
||||
const char16_t* str_end = std::find(str, str + max_size, '\0');
|
||||
std::wstring result(static_cast<size_t>(str_end - str), '\0');
|
||||
std::transform(str, str_end, result.begin(), static_cast<u16(&)(u16)>(Common::swap16));
|
||||
return UTF16ToUTF8(result);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue