1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix drivers coding for WinRT

- Add a proper function to retrieve IP addresses.
- Solve issues with Windows FileAccess and DirAccess to use the same code
  for WinRT.
- Add patches to the GLES2 rasterizer to workaround ANGLE issues.
This commit is contained in:
George Marques
2016-09-03 19:36:44 -03:00
parent 2eaad1cfd1
commit c9b82498b4
6 changed files with 37 additions and 29 deletions

View File

@@ -37,12 +37,6 @@
#include <stdio.h>
#include "print_string.h"
#ifdef WINRT_ENABLED
#include <Synchapi.h>
#include <collection.h>
#include <ppltasks.h>
#endif
/*
[03:57] <reduz> yessopie, so i dont havemak to rely on unicows
@@ -135,14 +129,6 @@ Error DirAccessWindows::change_dir(String p_dir) {
GLOBAL_LOCK_FUNCTION
#ifdef WINRT_ENABLED
p_dir = fix_path(p_dir);
current_dir = normalize_path(p_dir);
return OK;
#else
p_dir=fix_path(p_dir);
@@ -178,19 +164,12 @@ Error DirAccessWindows::change_dir(String p_dir) {
//}
return worked?OK:ERR_INVALID_PARAMETER;
#endif
}
Error DirAccessWindows::make_dir(String p_dir) {
GLOBAL_LOCK_FUNCTION
#ifdef WINRT_ENABLED
return ERR_CANT_CREATE;
#else
if (p_dir.is_rel_path())
p_dir=get_current_dir().plus_file(p_dir);
@@ -215,8 +194,6 @@ Error DirAccessWindows::make_dir(String p_dir) {
};
return ERR_CANT_CREATE;
#endif
}
@@ -259,7 +236,6 @@ bool DirAccessWindows::file_exists(String p_file) {
return false;
return !(fileAttr&FILE_ATTRIBUTE_DIRECTORY);
}
bool DirAccessWindows::dir_exists(String p_dir) {
@@ -282,7 +258,6 @@ bool DirAccessWindows::dir_exists(String p_dir) {
if (INVALID_FILE_ATTRIBUTES == fileAttr)
return false;
return (fileAttr&FILE_ATTRIBUTE_DIRECTORY);
}
Error DirAccessWindows::rename(String p_path,String p_new_path) {