Re-added memset statement to ensure that Qt GUI memory is zeroed at
startup.
This commit is contained in:
parent
f2c898f4c3
commit
5edd659949
|
@ -39,33 +39,7 @@ nes_shm_t *open_nes_shm(void)
|
||||||
|
|
||||||
vaddr = (nes_shm_t*)malloc( sizeof(struct nes_shm_t) );
|
vaddr = (nes_shm_t*)malloc( sizeof(struct nes_shm_t) );
|
||||||
|
|
||||||
//int shmId;
|
memset( vaddr, 0, sizeof(struct nes_shm_t));
|
||||||
//struct shmid_ds ds;
|
|
||||||
|
|
||||||
//shmId = shmget( IPC_PRIVATE, sizeof(struct nes_shm_t), IPC_CREAT | S_IRWXU | S_IRWXG );
|
|
||||||
|
|
||||||
//if ( shmId == -1 )
|
|
||||||
//{
|
|
||||||
// perror("Error: GL shmget Failed:");
|
|
||||||
// return NULL;
|
|
||||||
//}
|
|
||||||
//printf("Created ShmID: %i \n", shmId );
|
|
||||||
|
|
||||||
//vaddr = (nes_shm_t*)shmat( shmId, NULL, 0);
|
|
||||||
|
|
||||||
//if ( vaddr == (nes_shm_t*)-1 )
|
|
||||||
//{
|
|
||||||
// perror("Error: NES shmat Failed:");
|
|
||||||
// return NULL;
|
|
||||||
//}
|
|
||||||
//memset( vaddr, 0, sizeof(struct nes_shm_t));
|
|
||||||
|
|
||||||
//if ( shmctl( shmId, IPC_RMID, &ds ) != 0 )
|
|
||||||
//{
|
|
||||||
// perror("Error: GLX shmctl IPC_RMID Failed:");
|
|
||||||
//}
|
|
||||||
|
|
||||||
//sem_init( &vaddr->sem, 1, 1 );
|
|
||||||
|
|
||||||
vaddr->video.ncol = 256;
|
vaddr->video.ncol = 256;
|
||||||
vaddr->video.nrow = 256;
|
vaddr->video.nrow = 256;
|
||||||
|
|
Loading…
Reference in New Issue