diff options
| author | eska | 2016-11-18 18:52:44 +0100 |
|---|---|---|
| committer | eska | 2016-12-03 15:33:32 +0100 |
| commit | 6d86a63648c65c9e5e72747130ee3cb0ed49ab4c (patch) | |
| tree | 1374c791726a7825fa6258d8c920bd32638729d5 /platform/javascript/os_javascript.h | |
| parent | a3582fa3cb11c785ecf61dd2b04656473864b27e (diff) | |
| download | godot-6d86a63648c65c9e5e72747130ee3cb0ed49ab4c.tar.gz godot-6d86a63648c65c9e5e72747130ee3cb0ed49ab4c.tar.zst godot-6d86a63648c65c9e5e72747130ee3cb0ed49ab4c.zip | |
Diffstat (limited to 'platform/javascript/os_javascript.h')
| -rw-r--r-- | platform/javascript/os_javascript.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 16e4781d1..0f52d671d 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -44,9 +44,7 @@ #include "emscripten/html5.h" typedef void (*GFXInitFunc)(void *ud,bool gl2,int w, int h, bool fs); -typedef int (*OpenURIFunc)(const String&); typedef String (*GetDataDirFunc)(); -typedef String (*GetLocaleFunc)(); class OS_JavaScript : public OS_Unix { public: @@ -84,9 +82,7 @@ private: VideoMode default_videomode; MainLoop * main_loop; - OpenURIFunc open_uri_func; GetDataDirFunc get_data_dir_func; - GetLocaleFunc get_locale_func; static void _close_notification_funcs(const String& p_file,int p_flags); @@ -116,9 +112,12 @@ public: //static OS* get_singleton(); - virtual void vprint(const char* p_format, va_list p_list, bool p_stderr=false); - virtual void print(const char *p_format, ... ); - virtual void alert(const String& p_alert); + virtual void print_error(const char* p_function, const char* p_file, int p_line, const char *p_code, const char* p_rationale, ErrorType p_type) { + + OS::print_error(p_function, p_file, p_line, p_code, p_rationale, p_type); + } + + virtual void alert(const String& p_alert,const String& p_title="ALERT!"); virtual void set_mouse_show(bool p_show); @@ -159,8 +158,8 @@ public: virtual Error shell_open(String p_uri); virtual String get_data_dir() const; + String get_executable_path() const; virtual String get_resource_dir() const; - virtual String get_locale() const; void process_accelerometer(const Vector3& p_accelerometer); void process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points); @@ -170,7 +169,7 @@ public: virtual String get_joy_guid(int p_device) const; bool joy_connection_changed(int p_type, const EmscriptenGamepadEvent *p_event); - OS_JavaScript(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func); + OS_JavaScript(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, GetDataDirFunc p_get_data_dir_func); ~OS_JavaScript(); }; |
