usb: rename coordinates to width/height for touch
This commit is contained in:
parent
89dbc10334
commit
d68c7d1d10
|
@ -45,7 +45,7 @@ hid xml tag:
|
||||||
|
|
||||||
!...
|
!...
|
||||||
!<hid>
|
!<hid>
|
||||||
! <screen x="1024" y="768"/>
|
! <screen width="1024" height="768"/>
|
||||||
!<hid/>
|
!<hid/>
|
||||||
!...
|
!...
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@ struct Services
|
||||||
* Screen resolution used by touch devices to convert touchscreen
|
* Screen resolution used by touch devices to convert touchscreen
|
||||||
* absolute coordinates to screen absolute coordinates
|
* absolute coordinates to screen absolute coordinates
|
||||||
*/
|
*/
|
||||||
unsigned long screen_x = 0;
|
unsigned long screen_width = 0;
|
||||||
unsigned long screen_y = 0;
|
unsigned long screen_height = 0;
|
||||||
|
|
||||||
Services()
|
Services()
|
||||||
{
|
{
|
||||||
|
@ -50,10 +50,10 @@ struct Services
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Genode::Xml_node node_screen = node_hid.sub_node("screen");
|
Genode::Xml_node node_screen = node_hid.sub_node("screen");
|
||||||
node_screen.attribute("x").value(&screen_x);
|
node_screen.attribute("width").value(&screen_width);
|
||||||
node_screen.attribute("y").value(&screen_y);
|
node_screen.attribute("height").value(&screen_height);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
screen_x = screen_y = 0;
|
screen_width = screen_height = 0;
|
||||||
PDBG("Could not read screen resolution in config node");
|
PDBG("Could not read screen resolution in config node");
|
||||||
}
|
}
|
||||||
} catch (Xml_node::Nonexistent_sub_node) {
|
} catch (Xml_node::Nonexistent_sub_node) {
|
||||||
|
|
|
@ -94,7 +94,8 @@ void start_usb_driver(Server::Entrypoint &ep)
|
||||||
Services services;
|
Services services;
|
||||||
|
|
||||||
if (services.hid)
|
if (services.hid)
|
||||||
start_input_service(&ep.rpc_ep(), services.screen_x, services.screen_y);
|
start_input_service(&ep.rpc_ep(), services.screen_width,
|
||||||
|
services.screen_height);
|
||||||
|
|
||||||
Timer::init(ep);
|
Timer::init(ep);
|
||||||
Irq::init(ep);
|
Irq::init(ep);
|
||||||
|
|
Loading…
Reference in New Issue