X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fpandora%2Fplat.c;h=306f2c36821dadb19acdf6bb88489a7c7bca4eba;hb=a76fad41291b7be0b42554353d6775dcdff065e0;hp=72c63aa31bf4f91f0df3c3345d4535c9b57d22d2;hpb=41946d7023cded9999495eb8916eeb5ab0480a1f;p=picodrive.git diff --git a/platform/pandora/plat.c b/platform/pandora/plat.c index 72c63aa..306f2c3 100644 --- a/platform/pandora/plat.c +++ b/platform/pandora/plat.c @@ -73,6 +73,7 @@ static struct in_default_bind in_evdev_defbinds[] = { KEY_S, IN_BINDTYPE_PLAYER12, GBTN_B }, { KEY_D, IN_BINDTYPE_PLAYER12, GBTN_C }, { KEY_ENTER, IN_BINDTYPE_PLAYER12, GBTN_START }, + { KEY_F, IN_BINDTYPE_EMU, PEVB_FF }, { KEY_BACKSLASH, IN_BINDTYPE_EMU, PEVB_MENU }, { KEY_SPACE, IN_BINDTYPE_EMU, PEVB_MENU }, /* Pandora */ @@ -104,10 +105,13 @@ static void osd_text(int x, int y, const char *text) int i, h; len++; + if (x + len > g_screen_width) + len = g_screen_width - x; + for (h = 0; h < 8; h++) { unsigned short *p; p = (unsigned short *)g_screen_ptr + x + g_screen_width*(y + h); - for (i = len; i; i--, p++) + for (i = len; i > 0; i--, p++) *p = (*p>>2) & 0x39e7; } emu_text_out16(x, y, text); @@ -300,9 +304,6 @@ void emu_video_mode_change(int start_line, int line_count, int is_32cols) if (doing_bg_frame) return; - PicoDrawSetOutFormat(PDF_RGB555, 1); - PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2); - if (is_32cols) { fb_w = 256; fb_left = fb_right = 32; @@ -351,8 +352,10 @@ void emu_video_mode_change(int start_line, int line_count, int is_32cols) pnd_setup_layer(1, g_layer_x, g_layer_y, g_layer_w, g_layer_h); vout_fbdev_clear(layer_fb); - vout_fbdev_resize(layer_fb, fb_w, fb_h, 16, fb_left, fb_right, fb_top, fb_bottom, 3); + vout_fbdev_resize(layer_fb, fb_w, fb_h, 16, fb_left, fb_right, fb_top, fb_bottom, 4); plat_video_flip(); + + PicoDrawSetOutFormat(PDF_RGB555, 0); } void plat_video_loop_prepare(void) @@ -448,7 +451,7 @@ void plat_init(void) g_menuscreen_ptr = vout_fbdev_flip(main_fb); w = 320; h = 240; - layer_fb = vout_fbdev_init(layer_fb_name, &w, &h, 16, 3); + layer_fb = vout_fbdev_init(layer_fb_name, &w, &h, 16, 4); if (layer_fb == NULL) { fprintf(stderr, "couldn't init fb: %s\n", layer_fb_name); goto fail0;