add profiles in for testing speed for different target profiles
SVN revision: 31946
This commit is contained in:
parent
4f4c7127a2
commit
2def126d59
|
@ -1094,10 +1094,47 @@ _engine_go(void)
|
||||||
return go;
|
return go;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_profile_parse(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int ok = 0;
|
||||||
|
|
||||||
|
for (i = 1; i < argc; i++)
|
||||||
|
{
|
||||||
|
if ((!strcmp(argv[i], "-p")) && (i < (argc - 1)))
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
if (!strcmp(argv[i], "qvga")) {win_w = 320 ; win_h = 240 ;}
|
||||||
|
else if (!strcmp(argv[i], "qvga-p")) {win_w = 240 ; win_h = 320 ;}
|
||||||
|
else if (!strcmp(argv[i], "vga")) {win_w = 640 ; win_h = 480 ;}
|
||||||
|
else if (!strcmp(argv[i], "vga-p")) {win_w = 480 ; win_h = 640 ;}
|
||||||
|
else if (!strcmp(argv[i], "wvga")) {win_w = 800 ; win_h = 480 ;}
|
||||||
|
else if (!strcmp(argv[i], "wvga-p")) {win_w = 480 ; win_h = 800 ;}
|
||||||
|
else if (!strcmp(argv[i], "svga")) {win_w = 800 ; win_h = 600 ;}
|
||||||
|
else if (!strcmp(argv[i], "svga-p")) {win_w = 600 ; win_h = 800 ;}
|
||||||
|
else if (!strcmp(argv[i], "xga")) {win_w = 1024; win_h = 768 ;}
|
||||||
|
else if (!strcmp(argv[i], "xga-p")) {win_w = 768 ; win_h = 1024;}
|
||||||
|
else if (!strcmp(argv[i], "wxga")) {win_w = 1280; win_h = 768 ;}
|
||||||
|
else if (!strcmp(argv[i], "wxga-p")) {win_w = 768 ; win_h = 1280;}
|
||||||
|
else if (!strcmp(argv[i], "n800")) {win_w = 720 ; win_h = 420 ;}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("Invalid profile: %s\n", argv[i]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_engine_args(int argc, char **argv)
|
_engine_args(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
int profile_ok;
|
||||||
|
|
||||||
/* FIXME: parse args for geometry, engine etc. */
|
/* FIXME: parse args for geometry, engine etc. */
|
||||||
|
profile_ok = _profile_parse(argc, argv);
|
||||||
if (engine_software_x11_args(argc, argv))
|
if (engine_software_x11_args(argc, argv))
|
||||||
loop_func = engine_software_x11_loop;
|
loop_func = engine_software_x11_loop;
|
||||||
if (engine_gl_glew_args(argc, argv))
|
if (engine_gl_glew_args(argc, argv))
|
||||||
|
@ -1114,20 +1151,24 @@ _engine_args(int argc, char **argv)
|
||||||
loop_func = engine_software_sdl_loop;
|
loop_func = engine_software_sdl_loop;
|
||||||
if (engine_direct3d_args(argc, argv))
|
if (engine_direct3d_args(argc, argv))
|
||||||
loop_func = engine_direct3d_loop;
|
loop_func = engine_direct3d_loop;
|
||||||
if (!loop_func)
|
if ((!loop_func) || (!profile_ok))
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"No engine selected.\n"
|
"No engine selected.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -e ENGINE\n"
|
" -e ENGINE\n"
|
||||||
|
" -p PROFILE\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Where ENGINE can be one of:\n"
|
"Where ENGINE can be one of:\n"
|
||||||
" x11 xr gl-glew gl x11-16 ddraw direct3d sdl\n"
|
" x11 xr gl-glew gl x11-16 ddraw direct3d sdl\n"
|
||||||
|
"Where PROFILE can be one of:\n"
|
||||||
|
" qvga qvga-p vga vga-p wvga wvga-p svga svga-p xga xga-p wxga wxga-p\n"
|
||||||
|
" n800\n"
|
||||||
);
|
);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_output_size_set(evas, win_w, win_h);
|
evas_output_size_set(evas, win_w, win_h);
|
||||||
evas_output_viewport_set(evas, 0, 0, win_w, win_h);
|
evas_output_viewport_set(evas, 0, 0, win_w, win_h);
|
||||||
evas_key_modifier_add(evas, "Shift");
|
evas_key_modifier_add(evas, "Shift");
|
||||||
|
|
17
src/bin/ui.c
17
src/bin/ui.c
|
@ -241,15 +241,26 @@ _ui_setup(void)
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
o_bg = o;
|
o_bg = o;
|
||||||
|
|
||||||
o = evas_object_image_add(evas);
|
o = evas_object_rectangle_add(evas);
|
||||||
evas_object_move(o, 0, 0);
|
evas_object_move(o, 0, 0);
|
||||||
evas_object_image_file_set(o, PACKAGE_DATA_DIR"/data/bg.png", NULL);
|
|
||||||
evas_object_image_fill_set(o, 0, 0, win_w, win_h);
|
|
||||||
evas_object_resize(o, win_w, win_h);
|
evas_object_resize(o, win_w, win_h);
|
||||||
|
evas_object_color_set(o, 255, 255, 255, 255);
|
||||||
evas_object_layer_set(o, -99);
|
evas_object_layer_set(o, -99);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
o_wallpaper = o;
|
o_wallpaper = o;
|
||||||
|
|
||||||
|
/*
|
||||||
|
o = evas_object_image_add(evas);
|
||||||
|
evas_object_move(o, 0, 0);
|
||||||
|
evas_object_image_file_set(o, PACKAGE_DATA_DIR"/data/bg.png", NULL);
|
||||||
|
evas_object_image_fill_set(o, 0, 0, win_w, win_h);
|
||||||
|
evas_object_image_smooth_scale_set(o, 0);
|
||||||
|
evas_object_resize(o, win_w, win_h);
|
||||||
|
evas_object_layer_set(o, -99);
|
||||||
|
evas_object_show(o);
|
||||||
|
o_wallpaper = o;
|
||||||
|
*/
|
||||||
|
|
||||||
o = evas_object_text_add(evas);
|
o = evas_object_text_add(evas);
|
||||||
evas_object_text_font_set(o, "Vera-Bold", 10);
|
evas_object_text_font_set(o, "Vera-Bold", 10);
|
||||||
evas_object_text_text_set(o, "EXPEDITE");
|
evas_object_text_text_set(o, "EXPEDITE");
|
||||||
|
|
Loading…
Reference in New Issue