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