build fixes for msvc, ios and android

This commit is contained in:
Flyinghead 2022-03-27 15:57:01 +02:00
parent 6c38295d62
commit af0574c04e
3 changed files with 4 additions and 4 deletions

View File

@ -175,9 +175,9 @@ private:
void send(const sockaddr_in *addr, const Packet *packet, u32 size)
{
ssize_t rc = sendto(sock, (const char *)packet, size, 0,
int rc = sendto(sock, (const char *)packet, size, 0,
(sockaddr *)addr, sizeof(*addr));
if (rc != size)
if (rc != (int)size)
throw Exception("Send failed: errno " + std::to_string(get_last_error()));
DEBUG_LOG(NETWORK, "Sent port %d pckt %d size %x", ntohs(addr->sin_port), packet->type, size - (u32)packet->size(0));
}

View File

@ -302,7 +302,7 @@ public:
void rumble(float power, float inclination, u32 duration_ms) override
{
jboolean has_vibrator = jvm_attacher.getEnv()->CallBooleanMethod(input_device_manager, input_device_manager_rumble, android_id, power, inclination, duration_ms);
_rumble_enabled = has_vibrator;
rumbleEnabled = has_vibrator;
}
bool is_virtual_gamepad() override { return android_id == VIRTUAL_GAMEPAD_ID; }

View File

@ -314,7 +314,7 @@ public:
NSLog(@"Haptic engine error: \(error)");
else {
this->hapticEngine = hapticEngine;
_rumble_enabled = true;
rumbleEnabled = true;
}
}
}