aboutsummaryrefslogtreecommitdiff
path: root/emcclib.js
diff options
context:
space:
mode:
Diffstat (limited to 'emcclib.js')
-rw-r--r--emcclib.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/emcclib.js b/emcclib.js
index 1fb3a90..95ded9f 100644
--- a/emcclib.js
+++ b/emcclib.js
@@ -570,6 +570,15 @@ mergeInto(LibraryManager.library, {
},
/*
+ * double js_get_device_pixel_ratio();
+ *
+ * Return the current device pixel ratio.
+ */
+ js_get_device_pixel_ratio: function() {
+ return window.devicePixelRatio || 1;
+ },
+
+ /*
* void js_dialog_init(const char *title);
*
* Begin constructing a 'dialog box' which will be popped up in an