X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fplat.c;h=0e207bf523b9d8c72ba69bea1eebecc252e4def8;hb=d2f29611d1379a249c8f3f955ed16a336f9290cd;hp=075937ee705f37ec2b538806e057b4127f6d1d54;hpb=a96477bb5e1623dc132d632ac51a22cf7bdabfa7;p=libpicofe.git diff --git a/gp2x/plat.c b/gp2x/plat.c index 075937e..0e207bf 100644 --- a/gp2x/plat.c +++ b/gp2x/plat.c @@ -69,26 +69,6 @@ char cpu_clk_name[16] = "GP2X CPU clocks"; void plat_video_menu_enter(int is_rom_loaded) { - if (is_rom_loaded) - { - // darken the active framebuffer - memset(g_screen_ptr, 0, 320*8*2); - menu_darken_bg((char *)g_screen_ptr + 320*8*2, 320*224, 1); - memset((char *)g_screen_ptr + 320*232*2, 0, 320*8*2); - } - else - { - char buff[256]; - - // should really only happen once, on startup.. - emu_make_path(buff, "skin/background.png", sizeof(buff)); - if (readpng(g_screen_ptr, buff, READPNG_BG) < 0) - memset(g_screen_ptr, 0, 320*240*2); - } - - // copy to buffer2, switch to black - gp2x_memcpy_buffers((1<<2), g_screen_ptr, 0, 320*240*2); - /* try to switch nicely avoiding tearing on Wiz */ gp2x_video_wait_vsync(); memset(gp2x_screens[0], 0, 320*240*2); @@ -114,23 +94,6 @@ void plat_video_menu_end(void) gp2x_video_flip2(); } -void plat_validate_config(void) -{ - gp2x_soc_t soc; - - soc = soc_detect(); - if (soc != SOCID_MMSP2) - PicoOpt &= ~POPT_EXT_FM; - if (soc != SOCID_POLLUX) - currentConfig.EmuOpt &= ~EOPT_WIZ_TEAR_FIX; - - if (currentConfig.gamma < 10 || currentConfig.gamma > 300) - currentConfig.gamma = 100; - - if (currentConfig.CPUclock < 10 || currentConfig.CPUclock > 1024) - currentConfig.CPUclock = default_cpu_clock; -} - void plat_early_init(void) { gp2x_soc_t soc; @@ -175,6 +138,9 @@ void plat_init(void) gp2x_memset_all_buffers(0, 0, 320*240*2); + // use buffer2 for menubg (using only buffers 0, 1 in menu) + g_menubg_ptr = gp2x_screens[2]; + // snd sndout_oss_init(); }