mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 12:06:00 +00:00
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>
|
||||
! <screen x="1024" y="768"/>
|
||||
! <screen width="1024" height="768"/>
|
||||
!<hid/>
|
||||
!...
|
||||
|
||||
|
@ -37,8 +37,8 @@ struct Services
|
||||
* Screen resolution used by touch devices to convert touchscreen
|
||||
* absolute coordinates to screen absolute coordinates
|
||||
*/
|
||||
unsigned long screen_x = 0;
|
||||
unsigned long screen_y = 0;
|
||||
unsigned long screen_width = 0;
|
||||
unsigned long screen_height = 0;
|
||||
|
||||
Services()
|
||||
{
|
||||
@ -50,10 +50,10 @@ struct Services
|
||||
|
||||
try {
|
||||
Genode::Xml_node node_screen = node_hid.sub_node("screen");
|
||||
node_screen.attribute("x").value(&screen_x);
|
||||
node_screen.attribute("y").value(&screen_y);
|
||||
node_screen.attribute("width").value(&screen_width);
|
||||
node_screen.attribute("height").value(&screen_height);
|
||||
} catch (...) {
|
||||
screen_x = screen_y = 0;
|
||||
screen_width = screen_height = 0;
|
||||
PDBG("Could not read screen resolution in config node");
|
||||
}
|
||||
} catch (Xml_node::Nonexistent_sub_node) {
|
||||
|
@ -94,7 +94,8 @@ void start_usb_driver(Server::Entrypoint &ep)
|
||||
Services services;
|
||||
|
||||
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);
|
||||
Irq::init(ep);
|
||||
|
Loading…
x
Reference in New Issue
Block a user