mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-10-27 00:29:39 -04:00
misv fixes
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@565 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
e163b67f96
commit
a7efb231fe
2 changed files with 10 additions and 8 deletions
|
|
@ -174,7 +174,7 @@ static int g_read_offs = 0;
|
||||||
// when is eof really set?
|
// when is eof really set?
|
||||||
#define CHECKED_READ(len,data) \
|
#define CHECKED_READ(len,data) \
|
||||||
if (areaRead(data, 1, len, file) != len) { \
|
if (areaRead(data, 1, len, file) != len) { \
|
||||||
if (len == 1 && areaEof(file)) return 0; \
|
if (len == 1 && areaEof(file)) goto readend; \
|
||||||
R_ERROR_RETURN("areaRead: premature EOF\n"); \
|
R_ERROR_RETURN("areaRead: premature EOF\n"); \
|
||||||
return 1; \
|
return 1; \
|
||||||
} \
|
} \
|
||||||
|
|
@ -269,6 +269,7 @@ PICO_INTERNAL int PicoCdLoadState(void *file)
|
||||||
breakswitch:;
|
breakswitch:;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readend:
|
||||||
if (PicoAHW & PAHW_MCD)
|
if (PicoAHW & PAHW_MCD)
|
||||||
{
|
{
|
||||||
/* after load events */
|
/* after load events */
|
||||||
|
|
@ -324,6 +325,7 @@ int PicoCdLoadStateGfx(void *file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readend:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,13 @@ void gp2x_init(void)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
fbdev = open("/dev/fb0", O_RDWR);
|
||||||
|
if (fbdev == -1)
|
||||||
|
{
|
||||||
|
printf("open(\"/dev/fb0\") failed with %i\n", errno);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
ret = ioctl(fbdev, FBIOGET_FSCREENINFO, &fbfix);
|
ret = ioctl(fbdev, FBIOGET_FSCREENINFO, &fbfix);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
{
|
||||||
|
|
@ -231,13 +238,6 @@ void gp2x_init(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fbdev = open("/dev/fb0", O_RDWR);
|
|
||||||
if (fbdev == -1)
|
|
||||||
{
|
|
||||||
printf("open(\"/dev/fb0\") failed with %i\n", errno);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
screen = mmap(0, SCREEN_MAP_SIZE, PROT_WRITE|PROT_READ, MAP_SHARED, fbdev, 0);
|
screen = mmap(0, SCREEN_MAP_SIZE, PROT_WRITE|PROT_READ, MAP_SHARED, fbdev, 0);
|
||||||
if (screen == MAP_FAILED)
|
if (screen == MAP_FAILED)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue