diff options
Diffstat (limited to 'overlay')
-rw-r--r-- | overlay/lib.cpp | 7 | ||||
-rw-r--r-- | overlay/lib.h | 3 | ||||
-rw-r--r-- | overlay/overlay_exe/overlay_exe.cpp | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/overlay/lib.cpp b/overlay/lib.cpp index 43613bc98..f1d859846 100644 --- a/overlay/lib.cpp +++ b/overlay/lib.cpp @@ -276,7 +276,12 @@ void Pipe::checkMessage(unsigned int width, unsigned int height) { } break; case OVERLAY_MSGTYPE_BLIT: { - RECT r = {omMsg.omb.x, omMsg.omb.y, omMsg.omb.x + omMsg.omb.w, omMsg.omb.y + omMsg.omb.h}; + RECT r = { + static_cast<LONG>(omMsg.omb.x), + static_cast<LONG>(omMsg.omb.y), + static_cast<LONG>(omMsg.omb.x + omMsg.omb.w), + static_cast<LONG>(omMsg.omb.y + omMsg.omb.h) + }; std::vector<RECT>::iterator i = blits.begin(); while (i != blits.end()) { diff --git a/overlay/lib.h b/overlay/lib.h index 5cf28fa53..c572f4a5c 100644 --- a/overlay/lib.h +++ b/overlay/lib.h @@ -7,6 +7,9 @@ #define MUMBLE_LIB_H_ #define _UNICODE +#ifdef _WIN32_WINNT +# undef _WIN32_WINNT +#endif #define _WIN32_WINNT 0x0501 #include <stdio.h> #include <stdarg.h> diff --git a/overlay/overlay_exe/overlay_exe.cpp b/overlay/overlay_exe/overlay_exe.cpp index e3e1131a3..4d57801ed 100644 --- a/overlay/overlay_exe/overlay_exe.cpp +++ b/overlay/overlay_exe/overlay_exe.cpp @@ -150,8 +150,8 @@ int main(int argc, char **argv) { } try { - unsigned long passedInHandle = std::stoul(handleStr); - parent = reinterpret_cast<HANDLE>(passedInHandle & 0xFFFFFFFFUL); + unsigned long long passedInHandle = std::stoull(handleStr); + parent = reinterpret_cast<HANDLE>(passedInHandle & 0xFFFFFFFFULL); } catch(std::exception &) { return OVERLAY_HELPER_ERROR_EXE_INVALID_HANDLE_ARGUMENT; } |