Skip to content

Commit

Permalink
initial MPRIS support
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Sep 29, 2024
1 parent 665ccb3 commit c586646
Show file tree
Hide file tree
Showing 7 changed files with 447 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ if usb_support
]
endif

mpris_support = get_option('mpris') and host_machine.system() == 'linux'
if mpris_support
src += [ 'src/mpris.c' ]
endif

cc = meson.get_compiler('c')

dependencies = [
Expand All @@ -123,6 +128,11 @@ if usb_support
dependencies += dependency('libusb-1.0')
endif

if mpris_support
dependencies += dependency('glib-2.0')
dependencies += dependency('gio-2.0')
endif

if host_machine.system() == 'windows'
dependencies += cc.find_library('mingw32')
dependencies += cc.find_library('ws2_32')
Expand Down Expand Up @@ -174,6 +184,9 @@ conf.set('HAVE_V4L2', v4l2_support)
# enable HID over AOA support (linux only)
conf.set('HAVE_USB', usb_support)

# enable DBus MPRIS support (linux only)
conf.set('HAVE_MPRIS', mpris_support)

configure_file(configuration: conf, output: 'config.h')

src_dir = include_directories('src')
Expand Down
1 change: 1 addition & 0 deletions app/src/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ enum {
SC_EVENT_TIME_LIMIT_REACHED,
SC_EVENT_CONTROLLER_ERROR,
SC_EVENT_AOA_OPEN_ERROR,
SC_EVENT_RAISE_WINDOW,
};

bool
Expand Down
Loading

0 comments on commit c586646

Please sign in to comment.