diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-07-19 18:58:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-07-19 19:02:04 -0300 |
commit | c69de2ba46463adeadf90f38660d6b6e034d7e0b (patch) | |
tree | ddeb1c8e40c080a6544eba86fc12f138b54be0ed /platform/javascript | |
parent | 76bfe14e00ee5c8b65275d8b8e0c4cdc25b4b899 (diff) |
-Project/Editor settings now use new inspector
-Project/Editor settings now show tooltips properly
-Settings thar require restart now will show a restart warning
-Video driver is now visible all the time, can be changed easily
-Added function to request current video driver
Diffstat (limited to 'platform/javascript')
-rw-r--r-- | platform/javascript/os_javascript.cpp | 5 | ||||
-rw-r--r-- | platform/javascript/os_javascript.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index c05ae03ec6..b9d586e233 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -643,6 +643,9 @@ const char *OS_JavaScript::get_audio_driver_name(int p_driver) const { } // Lifecycle +int OS_JavaScript::get_current_video_driver() const { + return video_driver_index; +} void OS_JavaScript::initialize_core() { @@ -669,6 +672,8 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver, RasterizerGLES2::make_current(); break; } + + video_driver_index = p_video_driver; EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_create_context(NULL, &attributes); ERR_EXPLAIN("WebGL " + itos(attributes.majorVersion) + ".0 not available"); ERR_FAIL_COND_V(emscripten_webgl_make_context_current(ctx) != EMSCRIPTEN_RESULT_SUCCESS, ERR_UNAVAILABLE); diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 503c92585b..915320fe39 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -81,7 +81,11 @@ class OS_JavaScript : public OS_Unix { static void file_access_close_callback(const String &p_file, int p_flags); + int video_driver_index; + protected: + virtual int get_current_video_driver() const; + virtual void initialize_core(); virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver); |