mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 07:16:15 +00:00
Fixed: #1053 using x11 color depth retrieval on mac without cocoa (removes hardcoded value)
This commit is contained in:
parent
e034715e44
commit
3c469007f5
1 changed files with 8 additions and 19 deletions
|
@ -1696,28 +1696,11 @@ bool CDriverGL::getCurrentScreenMode(GfxMode &mode)
|
|||
|
||||
NL3D::MAC::getCurrentScreenMode(_win, mode);
|
||||
|
||||
#elif defined(NL_OS_MAC)
|
||||
/*
|
||||
TODO this is just a hack to get the ryzom client running on mac os x x11.
|
||||
the implementation below relies on the vidmode extension which is not
|
||||
available on mac os x's x11. for that reason the color depth value is
|
||||
hard coded here.
|
||||
FIXME replace this hack by native cocoa color depth retrieval
|
||||
*/
|
||||
nlwarning("FIXME: returning hardcoded color depth of 24bit");
|
||||
mode.Depth= 24;
|
||||
|
||||
#elif defined(NL_OS_UNIX)
|
||||
|
||||
bool found = false;
|
||||
int screen = DefaultScreen(_dpy);
|
||||
|
||||
// x11 fullscreen is not working on mac os x
|
||||
#if defined(NL_OS_MAC)
|
||||
mode.Windowed = true;
|
||||
found = true;
|
||||
#endif
|
||||
|
||||
#ifdef XRANDR
|
||||
|
||||
if (!found && _xrandr_version > 0)
|
||||
|
@ -1784,7 +1767,7 @@ bool CDriverGL::getCurrentScreenMode(GfxMode &mode)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // XF86VidMode
|
||||
|
||||
if (!found)
|
||||
{
|
||||
|
@ -1800,7 +1783,13 @@ bool CDriverGL::getCurrentScreenMode(GfxMode &mode)
|
|||
nldebug("Current mode: %dx%d, %d Hz, %dbit", mode.Width, mode.Height, mode.Frequency, mode.Depth);
|
||||
}
|
||||
|
||||
#endif
|
||||
#if defined(NL_OS_MAC)
|
||||
// x11 fullscreen is not working on mac os x
|
||||
mode.Windowed = true;
|
||||
#endif // NL_OS_MAC
|
||||
|
||||
#endif // NL_OS_UNIX
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue