Skip to content

Commit c586646

Browse files
committed
initial MPRIS support
1 parent 665ccb3 commit c586646

File tree

7 files changed

+447
-0
lines changed

7 files changed

+447
-0
lines changed

app/meson.build

+13
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ if usb_support
105105
]
106106
endif
107107

108+
mpris_support = get_option('mpris') and host_machine.system() == 'linux'
109+
if mpris_support
110+
src += [ 'src/mpris.c' ]
111+
endif
112+
108113
cc = meson.get_compiler('c')
109114

110115
dependencies = [
@@ -123,6 +128,11 @@ if usb_support
123128
dependencies += dependency('libusb-1.0')
124129
endif
125130

131+
if mpris_support
132+
dependencies += dependency('glib-2.0')
133+
dependencies += dependency('gio-2.0')
134+
endif
135+
126136
if host_machine.system() == 'windows'
127137
dependencies += cc.find_library('mingw32')
128138
dependencies += cc.find_library('ws2_32')
@@ -174,6 +184,9 @@ conf.set('HAVE_V4L2', v4l2_support)
174184
# enable HID over AOA support (linux only)
175185
conf.set('HAVE_USB', usb_support)
176186

187+
# enable DBus MPRIS support (linux only)
188+
conf.set('HAVE_MPRIS', mpris_support)
189+
177190
configure_file(configuration: conf, output: 'config.h')
178191

179192
src_dir = include_directories('src')

app/src/events.h

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ enum {
2020
SC_EVENT_TIME_LIMIT_REACHED,
2121
SC_EVENT_CONTROLLER_ERROR,
2222
SC_EVENT_AOA_OPEN_ERROR,
23+
SC_EVENT_RAISE_WINDOW,
2324
};
2425

2526
bool

0 commit comments

Comments
 (0)