Implement HTML5 cancel/ok button swap on Windows.

Platform is detected on init via the `navigator.platform` string.

(cherry picked from commit 0b286a287c)
This commit is contained in:
Fabio Alessandrelli 2020-07-27 13:53:03 +02:00 committed by Rémi Verschelde
parent 451648c34d
commit 31c21b9750
2 changed files with 18 additions and 0 deletions

View file

@ -69,6 +69,7 @@ class OS_JavaScript : public OS_Unix {
AudioDriverJavaScript *audio_driver_javascript;
VisualServer *visual_server;
bool swap_ok_cancel;
bool idb_available;
int64_t sync_wait_time;
int64_t last_sync_check_time;
@ -115,6 +116,7 @@ public:
// Override return type to make writing static callbacks less tedious.
static OS_JavaScript *get_singleton();
virtual bool get_swap_ok_cancel();
virtual void swap_buffers();
virtual void set_video_mode(const VideoMode &p_video_mode, int p_screen = 0);
virtual VideoMode get_video_mode(int p_screen = 0) const;