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 e55e15c commit afba421
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 @@ -101,6 +101,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 @@ -119,6 +124,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 @@ -170,6 +180,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 @@ -8,3 +8,4 @@
#define SC_EVENT_SCREEN_INIT_SIZE (SDL_USEREVENT + 7)
#define SC_EVENT_TIME_LIMIT_REACHED (SDL_USEREVENT + 8)
#define SC_EVENT_CONTROLLER_ERROR (SDL_USEREVENT + 9)
#define SC_EVENT_RAISE_WINDOW (SDL_USEREVENT + 10)
Loading

0 comments on commit afba421

Please sign in to comment.