notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
switch DMNA Silpheed hack to timeslice hack
[picodrive.git]
/
platform
/
gp2x
/
plat.c
diff --git
a/platform/gp2x/plat.c
b/platform/gp2x/plat.c
index
568d363
..
fe7b6fa
100644
(file)
--- a/
platform/gp2x/plat.c
+++ b/
platform/gp2x/plat.c
@@
-78,17
+78,28
@@
void plat_video_menu_enter(int is_rom_loaded)
}
else
{
}
else
{
+ char buff[256];
+
// should really only happen once, on startup..
// should really only happen once, on startup..
- readpng(g_screen_ptr, "skin/background.png", READPNG_BG);
+ 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
+ // copy to buffer2
, switch to black
gp2x_memcpy_buffers((1<<2), g_screen_ptr, 0, 320*240*2);
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);
+ memset(gp2x_screens[1], 0, 320*240*2);
+ gp2x_video_flip2();
+ gp2x_video_wait_vsync();
+ gp2x_video_wait_vsync();
+
// switch to 16bpp
gp2x_video_changemode_ll(16);
gp2x_video_RGB_setscaling(0, 320, 240);
// switch to 16bpp
gp2x_video_changemode_ll(16);
gp2x_video_RGB_setscaling(0, 320, 240);
- gp2x_video_flip2();
}
void plat_video_menu_begin(void)
}
void plat_video_menu_begin(void)
@@
-110,6
+121,8
@@
void plat_validate_config(void)
soc = soc_detect();
if (soc != SOCID_MMSP2)
PicoOpt &= ~POPT_EXT_FM;
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.gamma < 10 || currentConfig.gamma > 300)
currentConfig.gamma = 100;
@@
-147,6
+160,7
@@
void plat_init(void)
{
case SOCID_MMSP2:
mmsp2_init();
{
case SOCID_MMSP2:
mmsp2_init();
+ menu_plat_setup(0);
break;
case SOCID_POLLUX:
pollux_init();
break;
case SOCID_POLLUX:
pollux_init();