You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
small unicode fixes
This commit is contained in:
@@ -197,7 +197,7 @@ Error DirAccessWindows::change_dir(String p_dir) {
|
|||||||
if (worked) {
|
if (worked) {
|
||||||
|
|
||||||
GetCurrentDirectoryW(2048,real_current_dir_name);
|
GetCurrentDirectoryW(2048,real_current_dir_name);
|
||||||
current_dir=real_current_dir_name; // TODO, utf8 parser
|
current_dir=real_current_dir_name;
|
||||||
current_dir=current_dir.replace("\\","/");
|
current_dir=current_dir.replace("\\","/");
|
||||||
|
|
||||||
} //else {
|
} //else {
|
||||||
@@ -218,7 +218,7 @@ Error DirAccessWindows::change_dir(String p_dir) {
|
|||||||
if (worked) {
|
if (worked) {
|
||||||
|
|
||||||
GetCurrentDirectoryA(2048,real_current_dir_name);
|
GetCurrentDirectoryA(2048,real_current_dir_name);
|
||||||
current_dir=real_current_dir_name; // TODO, utf8 parser
|
current_dir=real_current_dir_name;
|
||||||
current_dir=current_dir.replace("\\","/");
|
current_dir=current_dir.replace("\\","/");
|
||||||
|
|
||||||
}// else {
|
}// else {
|
||||||
|
|||||||
@@ -2110,12 +2110,13 @@ bool OS_Windows::has_environment(const String& p_var) const {
|
|||||||
|
|
||||||
String OS_Windows::get_environment(const String& p_var) const {
|
String OS_Windows::get_environment(const String& p_var) const {
|
||||||
|
|
||||||
char* val = getenv(p_var.utf8().get_data());
|
wchar_t wval[0x7Fff]; // MSDN says 32767 char is the maximum
|
||||||
if (val)
|
int wlen = GetEnvironmentVariableW(p_var.c_str(),wval,0x7Fff);
|
||||||
return val;
|
if ( wlen > 0 ) {
|
||||||
|
return wval;
|
||||||
|
}
|
||||||
return "";
|
return "";
|
||||||
};
|
}
|
||||||
|
|
||||||
String OS_Windows::get_stdin_string(bool p_block) {
|
String OS_Windows::get_stdin_string(bool p_block) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user