Always use 64-bit pointer types for serialization

This way the 32-bit host can cast them down to 32-bit integers when
needed, and the serialization pipeline can stay fixed. We're not passing
any pointers directly to the other application anyway so this should be
safe!
This commit is contained in:
Robbert van der Helm
2020-04-29 17:17:33 +02:00
parent c9060e984d
commit 027d9a96d5
3 changed files with 31 additions and 10 deletions
+5 -2
View File
@@ -209,13 +209,16 @@ void passthrough_event(boost::asio::local::stream_protocol::socket& socket,
[&](const std::vector<uint8_t>& buffer) -> void* {
return const_cast<uint8_t*>(buffer.data());
},
[&](size_t& window_handle) -> void* {
[&](native_size_t& window_handle) -> void* {
// This is the X11 window handle that the editor should
// reparent itself to. We have a special wrapper around the
// dispatch function that intercepts `effEditOpen` events
// and creates a Win32 window and then finally embeds the
// X11 window Wine created into this wnidow handle.
return reinterpret_cast<void*>(window_handle);
// Make sure to convert the window ID first to `size_t` in
// case this is the 32-bit host.
return reinterpret_cast<void*>(
static_cast<size_t>(window_handle));
},
[&](const AEffect&) -> void* { return nullptr; },
[&](DynamicVstEvents& events) -> void* {