summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-09-27 16:48:09 +0200
committerGitHub <noreply@github.com>2018-09-27 16:48:09 +0200
commit4cf5bb027678717263476e676cd23f881eef1ca1 (patch)
treea842d54e82a4998c8b593f86fef858560c10b4d2 /main
parentcb5a62903f9798da8b12f625cbd5a493f14e41d3 (diff)
parentcdc411fd54fbafc414b29abb1d50a0ff327f0d89 (diff)
Merge pull request #22446 from akien-mga/fix-warnings
Fix various warnings raised by GCC 5
Diffstat (limited to 'main')
-rw-r--r--main/input_default.cpp7
-rw-r--r--main/input_default.h3
-rw-r--r--main/main.cpp1
3 files changed, 6 insertions, 5 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 10be291b8d..913c143025 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -343,9 +343,9 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
button_event->set_pressed(st->is_pressed());
button_event->set_button_index(BUTTON_LEFT);
if (st->is_pressed()) {
- button_event->set_button_mask(mouse_button_mask | (1 << BUTTON_LEFT - 1));
+ button_event->set_button_mask(mouse_button_mask | (1 << (BUTTON_LEFT - 1)));
} else {
- button_event->set_button_mask(mouse_button_mask & ~(1 << BUTTON_LEFT - 1));
+ button_event->set_button_mask(mouse_button_mask & ~(1 << (BUTTON_LEFT - 1)));
}
_parse_input_event_impl(button_event, true);
@@ -576,7 +576,7 @@ void InputDefault::ensure_touch_mouse_raised() {
button_event->set_global_position(mouse_pos);
button_event->set_pressed(false);
button_event->set_button_index(BUTTON_LEFT);
- button_event->set_button_mask(mouse_button_mask & ~(1 << BUTTON_LEFT - 1));
+ button_event->set_button_mask(mouse_button_mask & ~(1 << (BUTTON_LEFT - 1)));
_parse_input_event_impl(button_event, true);
}
@@ -636,6 +636,7 @@ InputDefault::InputDefault() {
emulate_mouse_from_touch = false;
mouse_from_touch_index = -1;
main_loop = NULL;
+ default_shape = CURSOR_ARROW;
hat_map_default[HAT_UP].type = TYPE_BUTTON;
hat_map_default[HAT_UP].index = JOY_DPAD_UP;
diff --git a/main/input_default.h b/main/input_default.h
index 4441ade04e..b420ec124b 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -119,7 +119,8 @@ class InputDefault : public Input {
SpeedTrack mouse_speed_track;
Map<int, Joypad> joy_names;
int fallback_mapping;
- CursorShape default_shape = CURSOR_ARROW;
+
+ CursorShape default_shape;
public:
enum HatMask {
diff --git a/main/main.cpp b/main/main.cpp
index dac646ba70..5320d73c7f 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -129,7 +129,6 @@ static bool init_always_on_top = false;
static bool init_use_custom_pos = false;
static Vector2 init_custom_pos;
static bool force_lowdpi = false;
-static bool use_vsync = true;
// Debug