usb: rename coordinates to width/height for touch

This commit is contained in:
Alexander Boettcher 2015-02-26 13:18:08 +01:00 committed by Christian Helmuth
parent 89dbc10334
commit d68c7d1d10
3 changed files with 8 additions and 7 deletions

View File

@ -45,7 +45,7 @@ hid xml tag:
!... !...
!<hid> !<hid>
! <screen x="1024" y="768"/> ! <screen width="1024" height="768"/>
!<hid/> !<hid/>
!... !...

View File

@ -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) {

View File

@ -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);