mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 17:12:37 -06:00
Merge pull request #19 from rtiangha/build-fixes
Various build fixes for GCC and Clang
This commit is contained in:
commit
0c5d4ce429
3 changed files with 7 additions and 5 deletions
|
@ -73,8 +73,9 @@ OpenALSink::OpenALSink(std::string device_name) : impl(std::make_unique<Impl>())
|
||||||
|
|
||||||
auto alBufferCallbackSOFT =
|
auto alBufferCallbackSOFT =
|
||||||
reinterpret_cast<LPALBUFFERCALLBACKSOFT>(alGetProcAddress("alBufferCallbackSOFT"));
|
reinterpret_cast<LPALBUFFERCALLBACKSOFT>(alGetProcAddress("alBufferCallbackSOFT"));
|
||||||
alBufferCallbackSOFT(impl->buffer, AL_FORMAT_STEREO16, native_sample_rate, &Impl::Callback,
|
alBufferCallbackSOFT(impl->buffer, AL_FORMAT_STEREO16, native_sample_rate,
|
||||||
impl.get());
|
reinterpret_cast<ALBUFFERCALLBACKTYPESOFT>(&Impl::Callback), impl.get());
|
||||||
|
|
||||||
if (alGetError() != AL_NO_ERROR) {
|
if (alGetError() != AL_NO_ERROR) {
|
||||||
LOG_CRITICAL(Audio_Sink, "alBufferCallbackSOFT failed: {}", alGetError());
|
LOG_CRITICAL(Audio_Sink, "alBufferCallbackSOFT failed: {}", alGetError());
|
||||||
Close();
|
Close();
|
||||||
|
|
|
@ -22,7 +22,8 @@ QString GetOpenGLRenderer() {
|
||||||
QOpenGLContext context;
|
QOpenGLContext context;
|
||||||
if (context.create()) {
|
if (context.create()) {
|
||||||
context.makeCurrent(&surface);
|
context.makeCurrent(&surface);
|
||||||
return QString::fromUtf8(context.functions()->glGetString(GL_RENDERER));
|
return QString::fromUtf8(
|
||||||
|
reinterpret_cast<const char*>(context.functions()->glGetString(GL_RENDERER)));
|
||||||
} else {
|
} else {
|
||||||
return QStringLiteral("");
|
return QStringLiteral("");
|
||||||
}
|
}
|
||||||
|
|
|
@ -2251,7 +2251,7 @@ std::optional<SOC_U::InterfaceInfo> SOC_U::GetDefaultInterfaceInfo() {
|
||||||
socklen_t s_info_len = sizeof(struct sockaddr_in);
|
socklen_t s_info_len = sizeof(struct sockaddr_in);
|
||||||
sockaddr_in s_info;
|
sockaddr_in s_info;
|
||||||
|
|
||||||
if ((sock_fd = ::socket(AF_INET, SOCK_STREAM, 0)) == -1) {
|
if (static_cast<int>(sock_fd = ::socket(AF_INET, SOCK_STREAM, 0)) == -1) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2269,7 +2269,7 @@ std::optional<SOC_U::InterfaceInfo> SOC_U::GetDefaultInterfaceInfo() {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
sock_fd = WSASocket(AF_INET, SOCK_DGRAM, 0, 0, 0, 0);
|
sock_fd = WSASocket(AF_INET, SOCK_DGRAM, 0, 0, 0, 0);
|
||||||
if (sock_fd == SOCKET_ERROR) {
|
if (static_cast<int>(sock_fd) == SOCKET_ERROR) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue