]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/dope/server/l4/server.cc
update
[l4.git] / l4 / pkg / dope / server / l4 / server.cc
index 00d5a156e2046b86b21276afef45e9e52ab1e551..71514f1f1675b4ba1020cfcfb6d2be4d9ca8943f 100644 (file)
@@ -376,23 +376,21 @@ public:
 Dope_fb::Dope_fb(const char *configstr)
 {
   unsigned long val;
-  unsigned xpos = 20, ypos = 20;
+  unsigned xpos = 20, ypos = 20, w, h;
 
   dope_registry->register_obj(this);
 
   _screen_info.width     = 300;
   _screen_info.height    = 200;
 
+  if (sscanf(configstr, "%dx%d", &w, &h) == 2)
+    {
+      _screen_info.width = w;
+      _screen_info.height = h;
+    }
 
-  if (get_val(configstr, "w=", &val))
-    _screen_info.width  = val;
-  if (get_val(configstr, "h=", &val))
-    _screen_info.height = val;
-
-  if (get_val(configstr, "x=", &val))
-    xpos = val;
-  if (get_val(configstr, "y=", &val))
-    ypos = val;
+  if (char *a = strstr(configstr, "pos="))
+    sscanf(a + 4, "%d,%d", &xpos, &ypos);
 
   L4Re::Video::Pixel_info pixinfo(16, 5, 11, 6, 5, 5, 0);
   pixinfo.bytes_per_pixel(2);