X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pandora%2Fplat.c;h=9951973207d18e1e1a7a2bdf7ad16d7a820af573;hb=b6072c177f57cdcb32cfd5eee53b7c178f89c5d3;hp=5992f739f96231f92d0ba0832f9dfb3661a6a814;hpb=c66f49e61a09926e828b2685cc997a6ebee7cdb4;p=libpicofe.git diff --git a/pandora/plat.c b/pandora/plat.c index 5992f73..9951973 100644 --- a/pandora/plat.c +++ b/pandora/plat.c @@ -39,7 +39,6 @@ static unsigned char __attribute__((aligned(4))) fb_copy[g_screen_width * g_scre unsigned char *PicoDraw2FB = temp_frame; const char *renderer_names[] = { NULL }; const char *renderer_names32x[] = { NULL }; -char cpu_clk_name[] = "Max CPU clock"; static int get_cpu_clock(void) { @@ -115,12 +114,10 @@ static int emuscan(unsigned int num) void pemu_finalize_frame(const char *fps, const char *notice) { - if (notice || (currentConfig.EmuOpt & EOPT_SHOW_FPS)) { - if (notice) - osd_text(2, g_osd_y, notice); - if (currentConfig.EmuOpt & EOPT_SHOW_FPS) - osd_text(g_osd_fps_x, g_osd_y, fps); - } + if (notice && notice[0]) + osd_text(2, g_osd_y, notice); + if (fps && fps[0] && (currentConfig.EmuOpt & EOPT_SHOW_FPS)) + osd_text(g_osd_fps_x, g_osd_y, fps); if ((PicoAHW & PAHW_MCD) && (currentConfig.EmuOpt & EOPT_EN_CD_LEDS)) draw_cd_leds(); } @@ -155,7 +152,7 @@ void plat_video_wait_vsync(void) void plat_status_msg_clear(void) { - vout_fbdev_clear_lines(layer_fb, g_screen_height - 8, 8); + vout_fbdev_clear_lines(layer_fb, g_osd_y, 8); } void plat_status_msg_busy_next(const char *msg) @@ -339,7 +336,7 @@ int pnd_setup_layer(int enabled, int x, int y, int w, int h) void pnd_restore_layer_data(void) { - short *t = ((short *)fb_copy)[320*240 / 2 + 160]; + short *t = (short *)fb_copy + 320*240 / 2 + 160; // right now this is used by menu, which wants to preview something // so try to get something on the layer. @@ -373,9 +370,8 @@ void emu_video_mode_change(int start_line, int line_count, int is_32cols) { int fb_w = 320, fb_h = 240, fb_left = 0, fb_right = 0, fb_top = 0, fb_bottom = 0; - PicoScanBegin = emuscan; - PicoScanEnd = NULL; PicoDrawSetOutFormat(PDF_RGB555, 1); + PicoDrawSetCallbacks(emuscan, NULL); if (is_32cols) { fb_w = 256; @@ -426,6 +422,7 @@ 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_resize(layer_fb, fb_w, fb_h, fb_left, fb_right, fb_top, fb_bottom, 0); vout_fbdev_clear(layer_fb); + plat_video_flip(); } static void make_bg(void)