SDL_WM_SetIcon() in XCode. Why wont the icon show?

Discussion in 'Mac Programming' started by chrono1081, May 22, 2009.

  1. chrono1081 macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #1
    I've been porting an SDL project I've been working on in windows over to Mac OS but one thing has me completely stumped.

    When I call SDL_WM_SetIcon() (yes its where its supposed to be) I get a dock icon just fine but I never get an icon in the title bar of the program. I even tried adding the icon to the plist (sorry I think thats what its called) and I get the same results. I'm new to XCode and mac programming so that could be a factor but with SDL everything on windows ported just fine except for this : / Anyone have any ideas?
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    Perhaps this is because Mac OS X programs don't normally have title bar icons, and therefore Mac OS X doesn't support it. I wouldn't worry about this in any case, unless you're overriding the menu that appears when that icon is clicked, and if the preceding situation does apply to you, don't put essential commands there, as they won't appear for Mac users.
     
  3. autorelease macrumors regular

    Joined:
    Oct 13, 2008
    Location:
    Achewood, CA
    #3
    Typically you can't get an icon in the title bar if your window doesn't have a representedURL. I'm pretty sure it's against the human interface guidelines to have an icon in the title bar of a window that does not represent a document.
     
  4. chrono1081 thread starter macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #4
    Ah ok that makes sense cause everytime I've seen the icon its something thats a document (PDFs, Circus Ponies Notebook, etc).

    Thank you guys for the replies :)
     

Share This Page