Send screenshot to remote instance
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
fff4d6f61d
commit
be0ae63541
3 changed files with 30 additions and 5 deletions
|
@ -341,6 +341,7 @@ void Scene::onHoverKey(const HoverKeyEvent& e) {
|
|||
}
|
||||
if (e.key == GLFW_KEY_F7 && (e.mods & RACK_MOD_MASK) == 0) {
|
||||
patchUtils::deployToRemote();
|
||||
window::generateScreenshot();
|
||||
e.consume(this);
|
||||
}
|
||||
if (e.key == GLFW_KEY_F9 && (e.mods & RACK_MOD_MASK) == 0) {
|
||||
|
@ -543,4 +544,15 @@ void deployToRemote() {
|
|||
}
|
||||
|
||||
|
||||
void sendScreenshotToRemote(const char* const screenshot) {
|
||||
#ifdef HAVE_LIBLO
|
||||
const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, REMOTE_HOST_PORT);
|
||||
DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,);
|
||||
|
||||
lo_send(addr, "/screenshot", "s", screenshot);
|
||||
lo_address_free(addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
} // namespace patchUtils
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue