diff options
author | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-06 02:00:37 +0000 |
---|---|---|
committer | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-06 02:00:37 +0000 |
commit | 7ee3b61338de1fa592227c719eca20f7813ea606 (patch) | |
tree | 057ca20e53d6384346f3e61114e450eb9bd1bc9c /UnixPkg/Sec/UgaX11.c | |
parent | 2ef2b01e07c02db339f34004445734a2dbdd80e1 (diff) | |
download | edk2-platforms-7ee3b61338de1fa592227c719eca20f7813ea606.tar.xz |
Added support for Xcode on Snow Leopard. Upaded with bug fixes for Snow Leopard.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9519 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/Sec/UgaX11.c')
-rw-r--r-- | UnixPkg/Sec/UgaX11.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/UnixPkg/Sec/UgaX11.c b/UnixPkg/Sec/UgaX11.c index 386e0bc145..2c2fb186b9 100644 --- a/UnixPkg/Sec/UgaX11.c +++ b/UnixPkg/Sec/UgaX11.c @@ -123,19 +123,17 @@ TryCreateShmImage(UGA_IO_PRIVATE *drv) drv->xshm_info.shmid = shmget (IPC_PRIVATE, drv->image->bytes_per_line * drv->image->height, IPC_CREAT | 0777); - if (drv->xshm_info.shmid < 0) - { - XDestroyImage(drv->image); - return 0; - } + if (drv->xshm_info.shmid < 0) { + XDestroyImage(drv->image); + return 0; + } drv->image_data = shmat (drv->xshm_info.shmid, NULL, 0); - if(!drv->image_data) - { - shmctl (drv->xshm_info.shmid, IPC_RMID, NULL); - XDestroyImage(drv->image); - return 0; - } + if(!drv->image_data) { + shmctl (drv->xshm_info.shmid, IPC_RMID, NULL); + XDestroyImage(drv->image); + return 0; + } #ifndef __APPLE__ // @@ -149,12 +147,11 @@ TryCreateShmImage(UGA_IO_PRIVATE *drv) drv->xshm_info.shmaddr = (char*)drv->image_data; drv->image->data = (char*)drv->image_data; - if (!XShmAttach (drv->display, &drv->xshm_info)) - { - shmdt (drv->image_data); - XDestroyImage(drv->image); - return 0; - } + if (!XShmAttach (drv->display, &drv->xshm_info)) { + shmdt (drv->image_data); + XDestroyImage(drv->image); + return 0; + } return 1; } @@ -386,7 +383,7 @@ UgaCheckKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo) } EFI_STATUS -UgaGetKey(EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key) +UgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key) { UGA_IO_PRIVATE *drv = (UGA_IO_PRIVATE *)UgaIo; EFI_STATUS status; |