# Fullscreen under OS X

**URL:** <https://discourse.libsdl.org/t/fullscreen-under-os-x/5217>\
**Category:** SDL Development\
**Created:** [October 9, 2001, 12:10pm UTC](https://discourse.libsdl.org/t/fullscreen-under-os-x/5217 "2001-10-09T12:10:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayson\_Baird](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Jayson\_Baird](https://discourse.libsdl.org/u/Jayson_Baird)\
**Post date:** [October 9, 2001, 12:10pm UTC](https://discourse.libsdl.org/t/fullscreen-under-os-x/5217/1 "2001-10-09T12:10:01Z")

</div>

Hello,

```
Does anyone know of any problems or success running full screen 

```

with Mac OS X?  
My program which I’m trying to run full screen runs either windowed, or  
fullscreen with the menu bar and dock on top. The line that sets the  
video mode is:

```
screen = SDL_SetVideoMode(1152, 768, 24, SDL_FULLSCREEN | 

```

SDL\_HWSURFACE | SDL\_DOUBLEBUF);

```
the odd resolution is due to the program being ran on a PowerBook G4.

```

I’ve tried changing the flags sent to SetVideoMode(), and still no luck.  
I’ve also tried compiling using Project Builder (OS X’s IDE) and cc from  
the terminal.

If you have any ideas, or thoughts, or perhaps a fix, thanks in advance,

Jay  
@Jayson_Baird

---

<div class="post-metadata">

**Author:** ![Darrell\_Walisser](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/darrell_walisser/32/588_2.png) [@Darrell\_Walisser](https://discourse.libsdl.org/u/Darrell_Walisser)\
**Post date:** [October 9, 2001, 1:02pm UTC](https://discourse.libsdl.org/t/fullscreen-under-os-x/5217/2 "2001-10-09T13:02:01Z")

</div>

> My program which I’m trying to run full screen runs either windowed, or  
> fullscreen with the menu bar and dock on top. The line that sets the  
> video mode is:
> 
> screen = SDL\_SetVideoMode(1152, 768, 24, SDL\_FULLSCREEN |  
> SDL\_HWSURFACE | SDL\_DOUBLEBUF);
> 
> the odd resolution is due to the program being ran on a PowerBook G4.

24bpp is not a valid bit depth. We should perhaps use a shadow surface in  
this case…

You can use 8,16,or 32 instead for the moment. Keep in mind that in OS X  
and 9, 32 bit colors are stored as ARGB-8-8-8-8, which you should see from  
looking at the surface’s flags.

Also be warned that the fullscreen mode disables command-tab and covers  
all other windows, so if you hang in fullscreen mode you might have to  
ssh to your machine to kill the process.

> I’ve also tried compiling using Project Builder (OS X’s IDE) and cc from  
> the terminal.

FYI, ProjectBuilder uses cc (a modified version of gcc 2.96) behind your  
back.

-DarrellOn Tue, 9 Oct 2001, Jayson Baird wrote:
