summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-10-13 15:53:34 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-10-13 15:53:34 -0300
commit79e5ced7e668fa53567ac6aaf5a26393cea6c9a2 (patch)
treef2c575f1957ab443eef49598f6f46c4285b4450c /core/os
parentb3cda43a0fb49e1cb9c8414077a23fa4b61ede38 (diff)
-A little More control about pixel snapping in 2D
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.cpp1
-rw-r--r--core/os/os.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 2db926e556..ee9f12b79d 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -516,6 +516,7 @@ OS::OS() {
_target_fps=0;
_render_thread_mode=RENDER_THREAD_SAFE;
_time_scale=1.0;
+ _pixel_snap=false;
Math::seed(1234567);
}
diff --git a/core/os/os.h b/core/os/os.h
index d89734d7d3..e5338b4a02 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -58,6 +58,7 @@ class OS {
float _fps;
int _target_fps;
float _time_scale;
+ bool _pixel_snap;
char *last_error;
@@ -393,7 +394,7 @@ public:
void set_time_scale(float p_scale);
float get_time_scale() const;
-
+ _FORCE_INLINE_ bool get_use_pixel_snap() const { return _pixel_snap; }
OS();
virtual ~OS();