mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
fix generic
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* determine the capabilities of the hardware.
|
||||
* part of libstb-hal
|
||||
*
|
||||
* (C) 2010-2012 Stefan Seyfried
|
||||
* (C) 2010-2012,2016 Stefan Seyfried
|
||||
*
|
||||
* License: GPL v2 or later
|
||||
*/
|
||||
@@ -14,12 +14,14 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <hardware_caps.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
static int initialized = 0;
|
||||
static hw_caps_t caps;
|
||||
|
||||
hw_caps_t *get_hwcaps(void)
|
||||
{
|
||||
struct utsname u;
|
||||
if (initialized)
|
||||
return ∩︀
|
||||
|
||||
@@ -32,6 +34,10 @@ hw_caps_t *get_hwcaps(void)
|
||||
caps.display_xres = 8;
|
||||
strcpy(caps.boxvendor, "Generic");
|
||||
strcpy(caps.boxname, "PC");
|
||||
if (! uname(&u))
|
||||
strncpy(caps.boxarch, u.machine, sizeof(caps.boxarch));
|
||||
else
|
||||
fprintf(stderr, "%s: uname() failed: %m\n", __func__);
|
||||
|
||||
return ∩︀
|
||||
}
|
||||
|
@@ -50,5 +50,6 @@ void shutdown_td_api()
|
||||
lt_info("%s, initialized = %d\n", __func__, (int)initialized);
|
||||
if (glfb)
|
||||
delete glfb;
|
||||
glfb = NULL;
|
||||
initialized = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user