mirror of
https://github.com/TASVideos/desmume
synced 2024-07-03 08:18:44 +00:00
Compare commits
5 Commits
e0c55f2fed
...
79c6a728f6
Author | SHA1 | Date | |
---|---|---|---|
|
79c6a728f6 | ||
|
90d0abdae0 | ||
|
738298a9e8 | ||
|
4a53a30b91 | ||
|
9515af82b2 |
19
.github/ISSUE_TEMPLATE/new-issue--bug-report--question.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE/new-issue--bug-report--question.md
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: New Issue, Bug report, Question
|
||||
about: New Issue, Bug report, Question
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## State your operating system:
|
||||
Windows/Mac/Linux. in case of linux, whether you use CLI, gtk2, or gtk3 version.
|
||||
|
||||
## DesMuME version
|
||||
e.g. 0.9.13 or git master
|
||||
|
||||
## Isse
|
||||
type here what's bothering you, in a detailed manner.
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ void GetINIPath()
|
|||
}
|
||||
|
||||
FCEUD_MakePathDirs(IniName);
|
||||
wcscpy(IniNameW,mbstowcs(IniName).c_str()); //careful to use locale C-style mbstowcs to get IniName (which is with locale encoding) to unicode
|
||||
wcscpy(IniNameW,mbstowcs_locale(IniName).c_str());
|
||||
|
||||
//write BOM to get unicode
|
||||
FILE* test = fopen(IniName,"rb");
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE 500 /* For strdup, realpath */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <boolean.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -170,7 +170,7 @@ void createDirectoryRecursively(std::wstring path)
|
|||
|
||||
void FCEUD_MakePathDirs(const char *fname)
|
||||
{
|
||||
createDirectoryRecursively(mbstowcs(fname));
|
||||
createDirectoryRecursively(mbstowcs_locale(fname));
|
||||
}
|
||||
#endif
|
||||
//------------------------------
|
||||
|
|
|
@ -284,6 +284,19 @@ std::string mass_replace(const std::string &source, const std::string &victim, c
|
|||
return answer;
|
||||
}
|
||||
|
||||
std::wstring mbstowcs_locale(std::string str)
|
||||
{
|
||||
#ifdef HOST_WINDOWS
|
||||
int plenty = str.size()*4+1;
|
||||
wchar_t *wgarbage = new wchar_t[plenty];
|
||||
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, str.data(), -1, wgarbage, plenty);
|
||||
std::wstring ret = wgarbage;
|
||||
delete[] wgarbage;
|
||||
return ret;
|
||||
#endif
|
||||
return mbstowcs(str);
|
||||
}
|
||||
|
||||
//convert a std::string to std::wstring
|
||||
std::wstring mbstowcs(std::string str)
|
||||
{
|
||||
|
|
|
@ -107,5 +107,7 @@ std::string mass_replace(const std::string &source, const std::string &victim, c
|
|||
std::wstring mbstowcs(std::string str);
|
||||
std::string wcstombs(std::wstring str);
|
||||
|
||||
std::wstring mbstowcs_locale(std::string str);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user