SteamOS: add udev_is_boot_vga tool to detect hybrid configs
This commit is contained in:
parent
a325bad986
commit
8ae6046bad
5 changed files with 46 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
||||||
bin_PROGRAMS = steamcompmgr loadargb_cursor
|
bin_PROGRAMS = steamcompmgr loadargb_cursor udev_is_boot_vga
|
||||||
|
|
||||||
steamcompmgr_SOURCES = src/steamcompmgr.c src/glext.h
|
steamcompmgr_SOURCES = src/steamcompmgr.c src/glext.h
|
||||||
loadargb_cursor_SOURCES = src/loadargbcursor.c
|
loadargb_cursor_SOURCES = src/loadargbcursor.c
|
||||||
|
udev_is_boot_vga_SOURCES = src/udev_is_boot_vga.c
|
||||||
|
|
||||||
AM_CFLAGS = $(DEPS_CFLAGS)
|
AM_CFLAGS = $(DEPS_CFLAGS)
|
||||||
AM_LIBS = $(DEPS_LIBS)
|
AM_LIBS = $(DEPS_LIBS)
|
||||||
|
@ -12,4 +13,7 @@ steamcompmgr_LDADD = $(DEPS_LIBS)
|
||||||
loadargb_cursor_CFLAGS = $(DEPS_CFLAGS)
|
loadargb_cursor_CFLAGS = $(DEPS_CFLAGS)
|
||||||
loadargb_cursor_LDADD = $(DEPS_LIBS)
|
loadargb_cursor_LDADD = $(DEPS_LIBS)
|
||||||
|
|
||||||
|
udev_is_boot_vga_CFLAGS = $(DEPS_CFLAGS)
|
||||||
|
udev_is_boot_vga_LDADD = $(DEPS_LIBS)
|
||||||
|
|
||||||
dist_doc_DATA = README
|
dist_doc_DATA = README
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
AC_INIT([SteamOS Compostitor], [1.0], [linux@steampowered.com], [steamos-compositor], [http://support.steampowered.com])
|
AC_INIT([SteamOS Compostitor], [1.0], [linux@steampowered.com], [steamos-compositor], [http://support.steampowered.com])
|
||||||
AM_INIT_AUTOMAKE([foreign tar-ustar])
|
AM_INIT_AUTOMAKE([foreign tar-ustar])
|
||||||
PKG_CHECK_MODULES([DEPS],xxf86vm gl x11 xrender xcomposite SDL_image)
|
PKG_CHECK_MODULES([DEPS],xxf86vm gl x11 xrender xcomposite SDL_image libudev)
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CC_STDC
|
AC_PROG_CC_STDC
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
steamos-compositor (1.17.3) alchemist; urgency=low
|
||||||
|
|
||||||
|
* Add udev_is_boot_vga, little tool to check which GPU drives the console.
|
||||||
|
|
||||||
|
-- Pierre-Loup A. Griffais <pgriffais@valvesoftware.com> Fri, 28 Feb 2014 18:39:57 -0800
|
||||||
|
|
||||||
steamos-compositor (1.16) alchemist; urgency=low
|
steamos-compositor (1.16) alchemist; urgency=low
|
||||||
|
|
||||||
* Only consider InputOutput windows for focus; this fixes "CID The Dummy"
|
* Only consider InputOutput windows for focus; this fixes "CID The Dummy"
|
||||||
|
|
4
debian/control
vendored
4
debian/control
vendored
|
@ -3,10 +3,10 @@ Maintainer: Pierre-Loup Griffais <pgriffais@valvesoftware.com>
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Standards-Version: 3.9.3
|
Standards-Version: 3.9.3
|
||||||
Build-Depends: debhelper (>= 8), pkg-config, libxxf86vm-dev, libgl1-mesa-dev, libx11-dev, libxrender-dev, libxcomposite-dev, libxdamage-dev, libsdl-image1.2-dev, automake, autoconf
|
Build-Depends: debhelper (>= 8), pkg-config, libxxf86vm-dev, libgl1-mesa-dev, libx11-dev, libxrender-dev, libxcomposite-dev, libxdamage-dev, libsdl-image1.2-dev, automake, autoconf, libudev-dev
|
||||||
|
|
||||||
Package: steamos-compositor
|
Package: steamos-compositor
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: libsdl-image1.2, ${shlibs:Depends}, ${misc:Depends}
|
Depends: libsdl-image1.2, libudev0, ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: SteamOS Compositor
|
Description: SteamOS Compositor
|
||||||
Provides graphics compositor services for the full-screen environment of SteamOS
|
Provides graphics compositor services for the full-screen environment of SteamOS
|
||||||
|
|
32
src/udev_is_boot_vga.c
Normal file
32
src/udev_is_boot_vga.c
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
// Thanks to Aaron Plattner for that snippet
|
||||||
|
// Public domain
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "libudev.h"
|
||||||
|
|
||||||
|
int main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
int ret = 1;
|
||||||
|
struct udev *udev = udev_new();
|
||||||
|
struct udev_enumerate *enumerate = udev_enumerate_new(udev);
|
||||||
|
struct udev_list_entry *entry;
|
||||||
|
|
||||||
|
if (argc != 2)
|
||||||
|
{
|
||||||
|
printf("usage: udev_is_boot_vga DRIVER\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
udev_enumerate_add_match_sysattr(enumerate, "boot_vga", "1");
|
||||||
|
udev_enumerate_add_match_sysattr(enumerate, "driver", argv[1]);
|
||||||
|
udev_enumerate_scan_devices(enumerate);
|
||||||
|
|
||||||
|
udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(enumerate)) {
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
udev_enumerate_unref(enumerate);
|
||||||
|
udev_unref(udev);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
Loading…
Reference in a new issue