mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
xfreerdp: add support for PlaySound
Using X keyboard bell.
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
#include <winpr/synch.h>
|
||||
#include <winpr/file.h>
|
||||
#include <winpr/print.h>
|
||||
#include <X11/XKBlib.h>
|
||||
|
||||
#include "xf_gdi.h"
|
||||
#include "xf_rail.h"
|
||||
@@ -707,6 +708,12 @@ static void xf_post_disconnect(freerdp *instance)
|
||||
xf_monitors_free(xfc, instance->settings);
|
||||
}
|
||||
|
||||
static void xf_play_sound(rdpContext* context, PLAY_SOUND_UPDATE* play_sound)
|
||||
{
|
||||
xfContext* xfc = (xfContext*) context;
|
||||
XkbBell(xfc->display, None, 100, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback given to freerdp_connect() to process the pre-connect operations.
|
||||
* It will fill the rdp_freerdp structure (instance) with the appropriate options to use for the connection.
|
||||
@@ -974,6 +981,7 @@ BOOL xf_post_connect(freerdp *instance)
|
||||
palette_cache_register_callbacks(instance->update);
|
||||
instance->update->BitmapUpdate = xf_gdi_bitmap_update;
|
||||
}
|
||||
instance->update->PlaySound = xf_play_sound;
|
||||
|
||||
instance->context->rail = rail_new(instance->settings);
|
||||
rail_register_update_callbacks(instance->context->rail, instance->update);
|
||||
|
||||
Reference in New Issue
Block a user