Fix #662 (classhint setting now checks for graphics)
Linux classhints didn't take into account graphics not being present. Add a check whether ProfileWorld is running without graphics. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11375 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
36ce4c63f4
commit
9d664e1fc7
@ -357,15 +357,19 @@ void IrrDriver::initDevice()
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
using namespace X11;
|
||||
const SExposedVideoData& videoData = m_device->getVideoDriver()->getExposedVideoData();
|
||||
XClassHint* classhint = XAllocClassHint();
|
||||
classhint->res_name = (char*)"SuperTuxKart";
|
||||
classhint->res_class = (char*)"SuperTuxKart";
|
||||
XSetClassHint((Display*)videoData.OpenGLLinux.X11Display,
|
||||
videoData.OpenGLLinux.X11Window,
|
||||
classhint);
|
||||
XFree(classhint);
|
||||
if (!ProfileWorld::isNoGraphics())
|
||||
{
|
||||
using namespace X11;
|
||||
const SExposedVideoData& videoData = m_device->getVideoDriver()
|
||||
->getExposedVideoData();
|
||||
XClassHint* classhint = XAllocClassHint();
|
||||
classhint->res_name = (char*)"SuperTuxKart";
|
||||
classhint->res_class = (char*)"SuperTuxKart";
|
||||
XSetClassHint((Display*)videoData.OpenGLLinux.X11Display,
|
||||
videoData.OpenGLLinux.X11Window,
|
||||
classhint);
|
||||
XFree(classhint);
|
||||
}
|
||||
#endif
|
||||
|
||||
m_scene_manager = m_device->getSceneManager();
|
||||
|
@ -82,14 +82,14 @@ RaceGUIBase::RaceGUIBase()
|
||||
m_gauge_empty = irr_driver->getTexture(guid+"gauge_empty.png");
|
||||
m_gauge_goal = irr_driver->getTexture(guid+"gauge_goal.png" );
|
||||
|
||||
m_dist_show_overlap = 2;
|
||||
m_icons_inertia = 2;
|
||||
m_dist_show_overlap = 2;
|
||||
m_icons_inertia = 2;
|
||||
|
||||
|
||||
//I18N: When some GlobalPlayerIcons are hidden, write "Top 10" to show it
|
||||
m_string_top = _("Top %i");
|
||||
m_string_top = _("Top %i");
|
||||
|
||||
m_referee = NULL;
|
||||
m_referee = NULL;
|
||||
} // RaceGUIBase
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user