Commit cc319102 authored by Rafaël Carré's avatar Rafaël Carré

motion control applesmc: fix for recent kernel

Exact kernel version needed is unknown, but has been around since at least one year+
See initial commit of https://code.launchpad.net/~mikael-sesamiq/macfanctld/trunk

Initial support for applesmc was untested anyway (173420e8)
parent 73b765d6
...@@ -129,11 +129,11 @@ int Open ( vlc_object_t *p_this ) ...@@ -129,11 +129,11 @@ int Open ( vlc_object_t *p_this )
/* Apple Motion Sensor support */ /* Apple Motion Sensor support */
p_intf->p_sys->sensor = AMS_SENSOR; p_intf->p_sys->sensor = AMS_SENSOR;
} }
else if( access( "/sys/devices/applesmc.768/position", R_OK ) == 0 ) else if( access( "/sys/devices/platform/applesmc.768/position", R_OK ) == 0 )
{ {
/* Apple SMC (newer macbooks) */ /* Apple SMC (newer macbooks) */
/* Should be factorised with HDAPS */ /* Should be factorised with HDAPS */
f = fopen( "/sys/devices/applesmc.768/calibrate", "r" ); f = fopen( "/sys/devices/platform/applesmc.768/calibrate", "r" );
if( f ) if( f )
{ {
p_intf->p_sys->i_calibrate = fscanf( f, "(%d,%d)", &i_x, &i_y ) == 2 ? i_x: 0; p_intf->p_sys->i_calibrate = fscanf( f, "(%d,%d)", &i_x, &i_y ) == 2 ? i_x: 0;
...@@ -312,7 +312,7 @@ static int GetOrientation( intf_thread_t *p_intf ) ...@@ -312,7 +312,7 @@ static int GetOrientation( intf_thread_t *p_intf )
return - i_x * 30; /* FIXME: arbitrary */ return - i_x * 30; /* FIXME: arbitrary */
case APPLESMC_SENSOR: case APPLESMC_SENSOR:
f = fopen( "/sys/devices/applesmc.768/position", "r" ); f = fopen( "/sys/devices/platform/applesmc.768/position", "r" );
if( !f ) if( !f )
{ {
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment