Skip to content

Commit 4977061

Browse files
committed
initial MPRIS support
1 parent 21e2e26 commit 4977061

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
@@ -101,6 +101,11 @@ if usb_support
101101
]
102102
endif
103103

104+
mpris_support = get_option('mpris') and host_machine.system() == 'linux'
105+
if mpris_support
106+
src += [ 'src/mpris.c' ]
107+
endif
108+
104109
cc = meson.get_compiler('c')
105110

106111
dependencies = [
@@ -119,6 +124,11 @@ if usb_support
119124
dependencies += dependency('libusb-1.0')
120125
endif
121126

127+
if mpris_support
128+
dependencies += dependency('glib-2.0')
129+
dependencies += dependency('gio-2.0')
130+
endif
131+
122132
if host_machine.system() == 'windows'
123133
dependencies += cc.find_library('mingw32')
124134
dependencies += cc.find_library('ws2_32')
@@ -170,6 +180,9 @@ conf.set('HAVE_V4L2', v4l2_support)
170180
# enable HID over AOA support (linux only)
171181
conf.set('HAVE_USB', usb_support)
172182

183+
# enable DBus MPRIS support (linux only)
184+
conf.set('HAVE_MPRIS', mpris_support)
185+
173186
configure_file(configuration: conf, output: 'config.h')
174187

175188
src_dir = include_directories('src')

app/src/events.h

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
#define SC_EVENT_SCREEN_INIT_SIZE (SDL_USEREVENT + 7)
99
#define SC_EVENT_TIME_LIMIT_REACHED (SDL_USEREVENT + 8)
1010
#define SC_EVENT_CONTROLLER_ERROR (SDL_USEREVENT + 9)
11+
#define SC_EVENT_RAISE_WINDOW (SDL_USEREVENT + 10)

0 commit comments

Comments
 (0)