mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix signed/unsigned conversion warning
There was no bug here (as I checked for negativeness), however it's good to get rid of warnings.
This commit is contained in:
parent
c28a843592
commit
271d7c31e6
@ -170,12 +170,12 @@ void JoystickController::onJoystickConnect(const std::vector<irr::SJoystickInfo>
|
||||
s32 id = g_settings->getS32("joystick_id");
|
||||
std::string layout = g_settings->get("joystick_type");
|
||||
|
||||
if (id < 0 || id >= joystick_infos.size()) {
|
||||
if (id < 0 || (u16)id >= joystick_infos.size()) {
|
||||
// TODO: auto detection
|
||||
id = 0;
|
||||
}
|
||||
|
||||
if (id >= 0 && id < joystick_infos.size()) {
|
||||
if (id >= 0 && (u16)id < joystick_infos.size()) {
|
||||
if (layout.empty() || layout == "auto")
|
||||
setLayoutFromControllerName(joystick_infos[id].Name.c_str());
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user