random fixes (root path and mmap svp tcache)

git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@714 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2009-07-25 19:01:45 +00:00
parent 8e77275eda
commit 45deb4099e
6 changed files with 54 additions and 39 deletions

View file

@ -295,15 +295,10 @@ void YM2612Init_940(int baseclock, int rate)
{
unsigned char ucData[1024];
int nRead, i, nLen = 0;
char binpath[1024];
char binpath[512];
FILE *fp;
strncpy(binpath, g_argv[0], 1023);
binpath[1023] = 0;
for (i = strlen(binpath); i > 0; i--)
if (binpath[i] == '/') { binpath[i] = 0; break; }
strcat(binpath, "/" CODE940_FILE);
emu_make_path(binpath, CODE940_FILE, sizeof(binpath));
fp = fopen(binpath, "rb");
if(!fp)
{

View file

@ -78,8 +78,12 @@ void plat_video_menu_enter(int is_rom_loaded)
}
else
{
char buff[256];
// 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