summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/net_socket_android.cpp5
-rw-r--r--platform/android/net_socket_android.h6
-rw-r--r--platform/haiku/key_mapping_haiku.h2
-rw-r--r--platform/iphone/app_delegate.mm70
-rw-r--r--platform/iphone/export/export.cpp8
-rw-r--r--platform/iphone/game_center.mm2
-rw-r--r--platform/iphone/icloud.mm2
-rw-r--r--platform/iphone/in_app_store.mm2
-rw-r--r--platform/iphone/ios.mm2
-rw-r--r--platform/iphone/os_iphone.cpp6
-rw-r--r--platform/javascript/display_server_javascript.cpp9
-rw-r--r--platform/javascript/http_client.h.inc16
-rw-r--r--platform/javascript/http_client_javascript.cpp10
-rw-r--r--platform/linuxbsd/key_mapping_x11.h2
-rw-r--r--platform/uwp/app.cpp10
-rw-r--r--platform/uwp/app.h16
-rw-r--r--platform/uwp/export/export.cpp22
-rw-r--r--platform/uwp/joypad_uwp.cpp12
-rw-r--r--platform/windows/joypad_windows.cpp12
-rw-r--r--platform/windows/key_mapping_windows.h2
20 files changed, 86 insertions, 130 deletions
diff --git a/platform/android/net_socket_android.cpp b/platform/android/net_socket_android.cpp
index 320bdd3817..dc0154ea01 100644
--- a/platform/android/net_socket_android.cpp
+++ b/platform/android/net_socket_android.cpp
@@ -72,11 +72,6 @@ void NetSocketAndroid::make_default() {
_create = _create_func;
}
-NetSocketAndroid::NetSocketAndroid() :
- wants_broadcast(false),
- multicast_groups(0) {
-}
-
NetSocketAndroid::~NetSocketAndroid() {
close();
}
diff --git a/platform/android/net_socket_android.h b/platform/android/net_socket_android.h
index 4fc80d2de1..7d6267e8b3 100644
--- a/platform/android/net_socket_android.h
+++ b/platform/android/net_socket_android.h
@@ -52,8 +52,8 @@ private:
static jmethodID _multicast_lock_acquire;
static jmethodID _multicast_lock_release;
- bool wants_broadcast;
- int multicast_groups;
+ bool wants_broadcast = false;
+ int multicast_groups = 0;
static void multicast_lock_acquire();
static void multicast_lock_release();
@@ -71,7 +71,7 @@ public:
virtual Error join_multicast_group(const IP_Address &p_multi_address, String p_if_name);
virtual Error leave_multicast_group(const IP_Address &p_multi_address, String p_if_name);
- NetSocketAndroid();
+ NetSocketAndroid() {}
~NetSocketAndroid();
};
diff --git a/platform/haiku/key_mapping_haiku.h b/platform/haiku/key_mapping_haiku.h
index a0e85e3390..e735108e44 100644
--- a/platform/haiku/key_mapping_haiku.h
+++ b/platform/haiku/key_mapping_haiku.h
@@ -32,7 +32,7 @@
#define KEY_MAPPING_HAIKU_H
class KeyMappingHaiku {
- KeyMappingHaiku(){};
+ KeyMappingHaiku() {}
public:
static unsigned int get_keysym(int32 raw_char, int32 key);
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index 0ac8bb7a56..fb30441bd3 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -247,37 +247,31 @@ static void on_focus_in(ViewController *view_controller, bool *is_focus_out) {
int joy_id = [self getJoyIdForController:controller];
if (element == gamepad.buttonA) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_0,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_A,
gamepad.buttonA.isPressed);
} else if (element == gamepad.buttonB) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_1,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_B,
gamepad.buttonB.isPressed);
} else if (element == gamepad.buttonX) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_2,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_X,
gamepad.buttonX.isPressed);
} else if (element == gamepad.buttonY) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_3,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_Y,
gamepad.buttonY.isPressed);
} else if (element == gamepad.leftShoulder) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_L,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_LEFT_SHOULDER,
gamepad.leftShoulder.isPressed);
} else if (element == gamepad.rightShoulder) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_R,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_RIGHT_SHOULDER,
gamepad.rightShoulder.isPressed);
- } else if (element == gamepad.leftTrigger) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_L2,
- gamepad.leftTrigger.isPressed);
- } else if (element == gamepad.rightTrigger) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_R2,
- gamepad.rightTrigger.isPressed);
} else if (element == gamepad.dpad) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_UP,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_UP,
gamepad.dpad.up.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_DOWN,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_DOWN,
gamepad.dpad.down.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_LEFT,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_LEFT,
gamepad.dpad.left.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_RIGHT,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_RIGHT,
gamepad.dpad.right.isPressed);
};
@@ -285,20 +279,20 @@ static void on_focus_in(ViewController *view_controller, bool *is_focus_out) {
jx.min = -1;
if (element == gamepad.leftThumbstick) {
jx.value = gamepad.leftThumbstick.xAxis.value;
- OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_LX, jx);
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_AXIS_LEFT_X, jx);
jx.value = -gamepad.leftThumbstick.yAxis.value;
- OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_LY, jx);
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_AXIS_LEFT_Y, jx);
} else if (element == gamepad.rightThumbstick) {
jx.value = gamepad.rightThumbstick.xAxis.value;
- OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_RX, jx);
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_AXIS_RIGHT_X, jx);
jx.value = -gamepad.rightThumbstick.yAxis.value;
- OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_RY, jx);
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_AXIS_RIGHT_Y, jx);
} else if (element == gamepad.leftTrigger) {
jx.value = gamepad.leftTrigger.value;
- OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_L2, jx);
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_AXIS_TRIGGER_LEFT, jx);
} else if (element == gamepad.rightTrigger) {
jx.value = gamepad.rightTrigger.value;
- OSIPhone::get_singleton()->joy_axis(joy_id, JOY_ANALOG_R2, jx);
+ OSIPhone::get_singleton()->joy_axis(joy_id, JOY_AXIS_TRIGGER_RIGHT, jx);
};
};
} else if (controller.gamepad != nil) {
@@ -309,31 +303,31 @@ static void on_focus_in(ViewController *view_controller, bool *is_focus_out) {
int joy_id = [self getJoyIdForController:controller];
if (element == gamepad.buttonA) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_0,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_A,
gamepad.buttonA.isPressed);
} else if (element == gamepad.buttonB) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_1,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_B,
gamepad.buttonB.isPressed);
} else if (element == gamepad.buttonX) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_2,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_X,
gamepad.buttonX.isPressed);
} else if (element == gamepad.buttonY) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_3,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_Y,
gamepad.buttonY.isPressed);
} else if (element == gamepad.leftShoulder) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_L,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_LEFT_SHOULDER,
gamepad.leftShoulder.isPressed);
} else if (element == gamepad.rightShoulder) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_R,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_RIGHT_SHOULDER,
gamepad.rightShoulder.isPressed);
} else if (element == gamepad.dpad) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_UP,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_UP,
gamepad.dpad.up.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_DOWN,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_DOWN,
gamepad.dpad.down.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_LEFT,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_LEFT,
gamepad.dpad.left.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_RIGHT,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_RIGHT,
gamepad.dpad.right.isPressed);
};
};
@@ -347,19 +341,19 @@ static void on_focus_in(ViewController *view_controller, bool *is_focus_out) {
int joy_id = [self getJoyIdForController:controller];
if (element == gamepad.buttonA) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_0,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_A,
gamepad.buttonA.isPressed);
} else if (element == gamepad.buttonX) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_2,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_X,
gamepad.buttonX.isPressed);
} else if (element == gamepad.dpad) {
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_UP,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_UP,
gamepad.dpad.up.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_DOWN,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_DOWN,
gamepad.dpad.down.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_LEFT,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_LEFT,
gamepad.dpad.left.isPressed);
- OSIPhone::get_singleton()->joy_button(joy_id, JOY_DPAD_RIGHT,
+ OSIPhone::get_singleton()->joy_button(joy_id, JOY_BUTTON_DPAD_RIGHT,
gamepad.dpad.right.isPressed);
};
};
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index 2222a7f552..3904fd6cf9 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "export.h"
+
#include "core/io/image_loader.h"
#include "core/io/marshalls.h"
#include "core/io/resource_saver.h"
@@ -74,12 +75,9 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
struct ExportArchitecture {
String name;
- bool is_default;
+ bool is_default = false;
- ExportArchitecture() :
- name(""),
- is_default(false) {
- }
+ ExportArchitecture() {}
ExportArchitecture(String p_name, bool p_is_default) {
name = p_name;
diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm
index 99d539d4ff..52f025f333 100644
--- a/platform/iphone/game_center.mm
+++ b/platform/iphone/game_center.mm
@@ -395,6 +395,6 @@ GameCenter::GameCenter() {
authenticated = false;
};
-GameCenter::~GameCenter(){};
+GameCenter::~GameCenter() {}
#endif
diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm
index 251f78f2da..1b9b354727 100644
--- a/platform/iphone/icloud.mm
+++ b/platform/iphone/icloud.mm
@@ -354,6 +354,6 @@ ICloud::ICloud() {
}];
}
-ICloud::~ICloud(){};
+ICloud::~ICloud() {}
#endif
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm
index a8a887824f..c5a8ed2b2b 100644
--- a/platform/iphone/in_app_store.mm
+++ b/platform/iphone/in_app_store.mm
@@ -334,6 +334,6 @@ void InAppStore::set_auto_finish_transaction(bool b) {
auto_finish_transactions = b;
}
-InAppStore::~InAppStore(){};
+InAppStore::~InAppStore() {}
#endif
diff --git a/platform/iphone/ios.mm b/platform/iphone/ios.mm
index 2656f125b9..697c9b8a3d 100644
--- a/platform/iphone/ios.mm
+++ b/platform/iphone/ios.mm
@@ -81,4 +81,4 @@ String iOS::get_rate_url(int p_app_id) const {
return ret;
};
-iOS::iOS(){};
+iOS::iOS() {}
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 3ef521a61a..9254e660d8 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -372,8 +372,8 @@ void OSIPhone::finalize() {
event_count = 0;
};
-void OSIPhone::set_mouse_show(bool p_show){};
-void OSIPhone::set_mouse_grab(bool p_grab){};
+void OSIPhone::set_mouse_show(bool p_show) {}
+void OSIPhone::set_mouse_grab(bool p_grab) {}
bool OSIPhone::is_mouse_grab_enabled() const {
@@ -390,7 +390,7 @@ int OSIPhone::get_mouse_button_state() const {
return 0;
};
-void OSIPhone::set_window_title(const String &p_title){};
+void OSIPhone::set_window_title(const String &p_title) {}
void OSIPhone::alert(const String &p_alert, const String &p_title) {
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index 060e446fca..c302614eca 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -659,14 +659,7 @@ void DisplayServerJavaScript::process_joypads() {
for (int button = 0; button < button_count; button++) {
float value = state.analogButton[button];
- if (String::utf8(state.mapping) == "standard" && (button == JOY_ANALOG_L2 || button == JOY_ANALOG_R2)) {
- Input::JoyAxis joy_axis;
- joy_axis.min = 0;
- joy_axis.value = value;
- input->joy_axis(joypad, button, joy_axis);
- } else {
- input->joy_button(joypad, button, value);
- }
+ input->joy_button(joypad, button, value);
}
for (int axis = 0; axis < axis_count; axis++) {
diff --git a/platform/javascript/http_client.h.inc b/platform/javascript/http_client.h.inc
index ac275aadbc..4d5ff88bdd 100644
--- a/platform/javascript/http_client.h.inc
+++ b/platform/javascript/http_client.h.inc
@@ -33,21 +33,21 @@
Error prepare_request(Method p_method, const String &p_url, const Vector<String> &p_headers);
int xhr_id;
-int read_limit;
-int response_read_offset;
-Status status;
+int read_limit = 4096;
+int response_read_offset = 0;
+Status status = STATUS_DISCONNECTED;
String host;
-int port;
-bool use_tls;
+int port = -1;
+bool use_tls = false;
String username;
String password;
-int polled_response_code;
+int polled_response_code = 0;
String polled_response_header;
PackedByteArray polled_response;
#ifdef DEBUG_ENABLED
-bool has_polled;
-uint64_t last_polling_frame;
+bool has_polled = false;
+uint64_t last_polling_frame = 0;
#endif
diff --git a/platform/javascript/http_client_javascript.cpp b/platform/javascript/http_client_javascript.cpp
index 863c207896..19ce7ef219 100644
--- a/platform/javascript/http_client_javascript.cpp
+++ b/platform/javascript/http_client_javascript.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "core/io/http_client.h"
+
#include "http_request.h"
Error HTTPClient::connect_to_host(const String &p_host, int p_port, bool p_ssl, bool p_verify_host) {
@@ -281,15 +282,6 @@ Error HTTPClient::poll() {
HTTPClient::HTTPClient() {
xhr_id = godot_xhr_new();
- read_limit = 4096;
- status = STATUS_DISCONNECTED;
- port = -1;
- use_tls = false;
- polled_response_code = 0;
-#ifdef DEBUG_ENABLED
- has_polled = false;
- last_polling_frame = 0;
-#endif
}
HTTPClient::~HTTPClient() {
diff --git a/platform/linuxbsd/key_mapping_x11.h b/platform/linuxbsd/key_mapping_x11.h
index 10db43bcc4..8f5e01a3c2 100644
--- a/platform/linuxbsd/key_mapping_x11.h
+++ b/platform/linuxbsd/key_mapping_x11.h
@@ -41,7 +41,7 @@
#include "core/os/keyboard.h"
class KeyMappingX11 {
- KeyMappingX11(){};
+ KeyMappingX11() {}
public:
static unsigned int get_keycode(KeySym p_keysym);
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index d3870b0b6c..988f958739 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -78,16 +78,6 @@ public:
return 0;
}
-App::App() :
- mWindowClosed(false),
- mWindowVisible(true),
- mWindowWidth(0),
- mWindowHeight(0),
- mEglDisplay(EGL_NO_DISPLAY),
- mEglContext(EGL_NO_CONTEXT),
- mEglSurface(EGL_NO_SURFACE) {
-}
-
// The first method called when the IFrameworkView is being created.
void App::Initialize(CoreApplicationView ^ applicationView) {
// Register event handlers for app lifecycle. This example includes Activated, so that we
diff --git a/platform/uwp/app.h b/platform/uwp/app.h
index b7265ad086..5cffe378b1 100644
--- a/platform/uwp/app.h
+++ b/platform/uwp/app.h
@@ -45,7 +45,7 @@ namespace GodotUWP
ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
{
public:
- App();
+ App() {}
// IFrameworkView Methods.
virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
@@ -92,14 +92,14 @@ namespace GodotUWP
char** get_command_line(unsigned int* out_argc);
- bool mWindowClosed;
- bool mWindowVisible;
- GLsizei mWindowWidth;
- GLsizei mWindowHeight;
+ bool mWindowClosed = false;
+ bool mWindowVisible = true;
+ GLsizei mWindowWidth = 0;
+ GLsizei mWindowHeight = 0;
- EGLDisplay mEglDisplay;
- EGLContext mEglContext;
- EGLSurface mEglSurface;
+ EGLDisplay mEglDisplay = EGL_NO_DISPLAY;
+ EGLContext mEglContext = EGL_NO_CONTEXT;
+ EGLSurface mEglSurface = EGL_NO_SURFACE;
CoreWindow^ window;
OS_UWP* os;
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index bee1ddfc99..50136ccb66 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -115,21 +115,15 @@ class AppxPackager {
struct FileMeta {
String name;
- int lfh_size;
- bool compressed;
- size_t compressed_size;
- size_t uncompressed_size;
+ int lfh_size = 0;
+ bool compressed = false;
+ size_t compressed_size = 0;
+ size_t uncompressed_size = 0;
Vector<BlockHash> hashes;
- uLong file_crc32;
- ZPOS64_T zip_offset;
-
- FileMeta() :
- lfh_size(0),
- compressed(false),
- compressed_size(0),
- uncompressed_size(0),
- file_crc32(0),
- zip_offset(0) {}
+ uLong file_crc32 = 0;
+ ZPOS64_T zip_offset = 0;
+
+ FileMeta() {}
};
String progress_task;
diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp
index 93a9992706..066787e9d6 100644
--- a/platform/uwp/joypad_uwp.cpp
+++ b/platform/uwp/joypad_uwp.cpp
@@ -64,12 +64,12 @@ void JoypadUWP::process_controllers() {
button_mask *= 2;
}
- input->joy_axis(joy.id, JOY_AXIS_0, axis_correct(reading.LeftThumbstickX));
- input->joy_axis(joy.id, JOY_AXIS_1, axis_correct(reading.LeftThumbstickY, true));
- input->joy_axis(joy.id, JOY_AXIS_2, axis_correct(reading.RightThumbstickX));
- input->joy_axis(joy.id, JOY_AXIS_3, axis_correct(reading.RightThumbstickY, true));
- input->joy_axis(joy.id, JOY_AXIS_4, axis_correct(reading.LeftTrigger, false, true));
- input->joy_axis(joy.id, JOY_AXIS_5, axis_correct(reading.RightTrigger, false, true));
+ input->joy_axis(joy.id, JOY_AXIS_LEFT_X, axis_correct(reading.LeftThumbstickX));
+ input->joy_axis(joy.id, JOY_AXIS_LEFT_Y, axis_correct(reading.LeftThumbstickY, true));
+ input->joy_axis(joy.id, JOY_AXIS_RIGHT_X, axis_correct(reading.RightThumbstickX));
+ input->joy_axis(joy.id, JOY_AXIS_RIGHT_Y, axis_correct(reading.RightThumbstickY, true));
+ input->joy_axis(joy.id, JOY_AXIS_TRIGGER_LEFT, axis_correct(reading.LeftTrigger, false, true));
+ input->joy_axis(joy.id, JOY_AXIS_TRIGGER_RIGHT, axis_correct(reading.RightTrigger, false, true));
uint64_t timestamp = input->get_joy_vibration_timestamp(joy.id);
if (timestamp > joy.ff_timestamp) {
diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp
index 8fdc92a79c..821d4eb685 100644
--- a/platform/windows/joypad_windows.cpp
+++ b/platform/windows/joypad_windows.cpp
@@ -347,12 +347,12 @@ void JoypadWindows::process_joypads() {
button_mask = button_mask * 2;
}
- input->joy_axis(joy.id, JOY_AXIS_0, axis_correct(joy.state.Gamepad.sThumbLX, true));
- input->joy_axis(joy.id, JOY_AXIS_1, axis_correct(joy.state.Gamepad.sThumbLY, true, false, true));
- input->joy_axis(joy.id, JOY_AXIS_2, axis_correct(joy.state.Gamepad.sThumbRX, true));
- input->joy_axis(joy.id, JOY_AXIS_3, axis_correct(joy.state.Gamepad.sThumbRY, true, false, true));
- input->joy_axis(joy.id, JOY_AXIS_4, axis_correct(joy.state.Gamepad.bLeftTrigger, true, true));
- input->joy_axis(joy.id, JOY_AXIS_5, axis_correct(joy.state.Gamepad.bRightTrigger, true, true));
+ input->joy_axis(joy.id, JOY_AXIS_LEFT_X, axis_correct(joy.state.Gamepad.sThumbLX, true));
+ input->joy_axis(joy.id, JOY_AXIS_LEFT_Y, axis_correct(joy.state.Gamepad.sThumbLY, true, false, true));
+ input->joy_axis(joy.id, JOY_AXIS_RIGHT_X, axis_correct(joy.state.Gamepad.sThumbRX, true));
+ input->joy_axis(joy.id, JOY_AXIS_RIGHT_Y, axis_correct(joy.state.Gamepad.sThumbRY, true, false, true));
+ input->joy_axis(joy.id, JOY_AXIS_TRIGGER_LEFT, axis_correct(joy.state.Gamepad.bLeftTrigger, true, true));
+ input->joy_axis(joy.id, JOY_AXIS_TRIGGER_RIGHT, axis_correct(joy.state.Gamepad.bRightTrigger, true, true));
joy.last_packet = joy.state.dwPacketNumber;
}
uint64_t timestamp = input->get_joy_vibration_timestamp(joy.id);
diff --git a/platform/windows/key_mapping_windows.h b/platform/windows/key_mapping_windows.h
index 3361ad397f..028ca9fd5d 100644
--- a/platform/windows/key_mapping_windows.h
+++ b/platform/windows/key_mapping_windows.h
@@ -39,7 +39,7 @@
class KeyMappingWindows {
- KeyMappingWindows(){};
+ KeyMappingWindows() {}
public:
static unsigned int get_keysym(unsigned int p_code);