_emul_info.lcd_size_w = width;
_emul_info.lcd_size_h = height;
- INFO("emulator graphic resolution = %dx%d\n", _emul_info.lcd_size_w, _emul_info.lcd_size_h);
+ //INFO("emulator graphic resolution = %dx%d\n", _emul_info.lcd_size_w, _emul_info.lcd_size_h);
}
int get_emul_lcd_width(void)
{
int i;
int j;
+ int q = 0;
/* TODO: */
for (i = 1; i < argc; ++i) {
if (strncmp(argv[i], "--skin-args", 11) == 0) {
+ int w = 0;
+ int h = 0;
+ char *temp = NULL;
+
*skin_argv = &(argv[i + 1]);
+
+ /* find out the size of lcd */
+ for(q = 0; q < (argc - i - 7); ++q) {
+ if (strncmp(**skin_argv + q, "width=", 6) == 0) {
+ char *width = NULL;
+ char *width_argv = **skin_argv + q;
+ int len = strlen(width_argv) + 1;
+
+ temp = calloc(0, len * sizeof(char));
+ strcpy(temp, width_argv);
+ temp[len - 1] = '\0';
+
+ width = strtok(temp + 6, " ");
+ w = atoi(width);
+
+ free(temp);
+ } else if (strncmp(**skin_argv + q, "height=", 7) == 0) {
+ char *height = NULL;
+ char *height_argv = **skin_argv + q;
+ int len = strlen(height_argv) + 1;
+
+ temp = calloc(0, len * sizeof(char));
+ strcpy(temp, height_argv);
+ temp[len - 1] = '\0';
+
+ height = strtok(temp + 7, " ");
+ h = atoi(height);
+
+ free(temp);
+ }
+
+ if (w != 0 && h != 0) {
+ set_emul_lcd_size(w, h);
+ break;
+ }
+ }
+
break;
}
}
ds->surface->pf.bmask,
ds->surface->pf.amask);
} else {
- INFO("create blank screen\n");
+ INFO("create blank screen = (%d, %d)\n", get_emul_lcd_width(), get_emul_lcd_height());
surface_qemu = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h,
ds_get_bits_per_pixel(ds), 0, 0, 0, 0);
}