Re-added memset statement to ensure that Qt GUI memory is zeroed at

startup.
This commit is contained in:
mjbudd77 2021-02-06 13:41:16 -05:00
parent f2c898f4c3
commit 5edd659949
1 changed files with 1 additions and 27 deletions

View File

@ -39,33 +39,7 @@ nes_shm_t *open_nes_shm(void)
vaddr = (nes_shm_t*)malloc( sizeof(struct nes_shm_t) );
//int shmId;
//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 );
memset( vaddr, 0, sizeof(struct nes_shm_t));
vaddr->video.ncol = 256;
vaddr->video.nrow = 256;