diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-19 17:00:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-19 17:06:03 -0300 |
commit | 25678b1876816b9ccb14b2c92aef62f3b009f88f (patch) | |
tree | 189f082d788f78e16f620b056d21249118883fc5 /platform/windows | |
parent | 89588d43349e496a9e05756d42ae87323d31269e (diff) |
-Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/export/export.cpp | 1 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 10 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp index c9271f6266..6cb33e2ff0 100644 --- a/platform/windows/export/export.cpp +++ b/platform/windows/export/export.cpp @@ -46,6 +46,7 @@ void register_windows_exporter() { platform->set_debug_32("windows_32_debug.exe"); platform->set_release_64("windows_64_release.exe"); platform->set_debug_64("windows_64_debug.exe"); + platform->set_os_name("Windows"); EditorExport::get_singleton()->add_export_platform(platform); } diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 36d6cd8565..3413050f4a 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -37,12 +37,12 @@ #include "drivers/windows/rw_lock_windows.h" #include "drivers/windows/semaphore_windows.h" #include "drivers/windows/thread_windows.h" -#include "global_config.h" #include "io/marshalls.h" #include "joypad.h" #include "lang_table.h" #include "main/main.h" #include "packet_peer_udp_winsock.h" +#include "project_settings.h" #include "servers/audio_server.h" #include "servers/visual/visual_server_raster.h" #include "servers/visual/visual_server_wrap_mt.h" @@ -2229,7 +2229,7 @@ String OS_Windows::get_data_dir() const { if (has_environment("APPDATA")) { - bool use_godot = GlobalConfig::get_singleton()->get("application/config/use_shared_user_dir"); + bool use_godot = ProjectSettings::get_singleton()->get("application/config/use_shared_user_dir"); if (!use_godot) return (OS::get_singleton()->get_environment("APPDATA") + "/" + an).replace("\\", "/"); else @@ -2237,7 +2237,7 @@ String OS_Windows::get_data_dir() const { } } - return GlobalConfig::get_singleton()->get_resource_path(); + return ProjectSettings::get_singleton()->get_resource_path(); } bool OS_Windows::is_joy_known(int p_device) { @@ -2274,9 +2274,9 @@ int OS_Windows::get_power_percent_left() { return power_manager->get_power_percent_left(); } -bool OS_Windows::check_feature_support(const String &p_feature) { +bool OS_Windows::_check_internal_feature_support(const String &p_feature) { - return VisualServer::get_singleton()->has_os_feature(p_feature); + return p_feature == "pc" || p_feature == "s3tc"; } OS_Windows::OS_Windows(HINSTANCE _hInstance) { diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 835141145f..e6589ddfad 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -288,7 +288,7 @@ public: virtual int get_power_seconds_left(); virtual int get_power_percent_left(); - virtual bool check_feature_support(const String &p_feature); + virtual bool _check_internal_feature_support(const String &p_feature); OS_Windows(HINSTANCE _hInstance); ~OS_Windows(); |