mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Replace C++ commants with C89 ones
This commit is contained in:
parent
77829a8e5b
commit
3f5eb55405
@ -84,19 +84,19 @@ static void *xshm_gfx_init(const video_info_t *video,
|
||||
{
|
||||
xshm->shmInfo.shmid = shmget(IPC_PRIVATE, sizeof(uint32_t) * video->width * video->height,
|
||||
IPC_CREAT|0600);
|
||||
if (xshm->shmInfo.shmid<0) abort();//seems like an out of memory situation... let's just blow up
|
||||
if (xshm->shmInfo.shmid<0) abort();/* seems like an out of memory situation... let's just blow up. */
|
||||
|
||||
xshm->shmInfo.shmaddr = (char*)shmat(xshm->shmInfo.shmid, 0, 0);
|
||||
xshm->shmInfo.readOnly = False;
|
||||
XShmAttach(g_x11_dpy, &xshm->shmInfo);
|
||||
XSync(g_x11_dpy, False);//no idea why this is required, but I get weird errors without it
|
||||
XSync(g_x11_dpy, False);/* no idea why this is required, but I get weird errors without it. */
|
||||
xshm->image = XShmCreateImage(g_x11_dpy, NULL, 24, ZPixmap,
|
||||
xshm->shmInfo.shmaddr, &xshm->shmInfo, video->width, video->height);
|
||||
xshm->fbptr = (uint8_t*)xshm->shmInfo.shmaddr;
|
||||
} else {
|
||||
size_t pitch = video->width * 4;
|
||||
void *data = malloc (pitch * video->height);
|
||||
if (!data) abort();//seems like an out of memory situation... let's just blow up
|
||||
if (!data) abort();/* seems like an out of memory situation... let's just blow up. */
|
||||
xshm->image = XCreateImage(g_x11_dpy, NULL, 24, ZPixmap, 0,
|
||||
data, video->width, video->height, 8, pitch);
|
||||
xshm->fbptr = data;
|
||||
|
Loading…
Reference in New Issue
Block a user