mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-10 00:41:19 +12:00
Add all the files
This commit is contained in:
parent
e3db07a16a
commit
d60742f52b
1445 changed files with 430238 additions and 0 deletions
26
src/gui/wxHelper.h
Normal file
26
src/gui/wxHelper.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
#include <wx/string.h>
|
||||
|
||||
namespace wxHelper
|
||||
{
|
||||
// wxString to utf8 std::string
|
||||
inline std::string MakeUTF8(const wxString& str)
|
||||
{
|
||||
auto tmpUtf8 = str.ToUTF8();
|
||||
return std::string(tmpUtf8.data(), tmpUtf8.length());
|
||||
}
|
||||
|
||||
inline fs::path MakeFSPath(const wxString& str)
|
||||
{
|
||||
auto tmpUtf8 = str.ToUTF8();
|
||||
auto sv = std::basic_string_view<char8_t>((const char8_t*)tmpUtf8.data(), tmpUtf8.length());
|
||||
return fs::path(sv);
|
||||
}
|
||||
|
||||
inline wxString FromUtf8(std::string_view str)
|
||||
{
|
||||
return wxString::FromUTF8(str.data(), str.size());
|
||||
}
|
||||
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue