Skip to content

Commit

Permalink
Client: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 7, 2013
1 parent febf170 commit 140c011
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion doomsday/client/include/clientapp.h
Expand Up @@ -39,7 +39,8 @@ class ClientApp : public de::GuiApp

/**
* Sets up all the subsystems of the application. Must be called before the
* event loop is started.
* event loop is started. At the end of this method, the bootstrap script is
* executed.
*/
void initialize();

Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/dd_main.h
Expand Up @@ -208,6 +208,8 @@ de::Games &App_Games();
/// @return The application's global World.
de::World &App_World();

bool App_HaveMaterials();

/// @return The application's global Materials (collection).
de::Materials &App_Materials();

Expand Down
7 changes: 6 additions & 1 deletion doomsday/client/src/dd_main.cpp
Expand Up @@ -619,13 +619,18 @@ void DD_ClearSystemTextureSchemes()

Materials &App_Materials()
{
if(!materials)
if(!App_HaveMaterials())
{
throw Error("App_Materials", "Materials collection not yet initialized");
}
return *materials;
}

bool App_HaveMaterials()
{
return materials != 0;
}

void DD_CreateMaterialSchemes()
{
Materials &materials = App_Materials();
Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/gl/sys_opengl.cpp
Expand Up @@ -191,8 +191,8 @@ static void printGLUInfo(void)
#define TABBED(A, B) _E(Ta) " " A " " _E(Tb) << B << "\n"

os << TABBED("Version:", (char const *) glGetString(GL_VERSION));
os << TABBED("Vendor:", (char const *) glGetString(GL_VENDOR));
os << TABBED("Renderer:", (char const *) glGetString(GL_RENDERER));
os << TABBED("Vendor:", (char const *) glGetString(GL_VENDOR));

LOG_MSG("%s") << str.rightStrip();

Expand Down Expand Up @@ -679,7 +679,7 @@ static void printExtensions(QStringList extensions)
foreach(QString ext, extensions)
{
ext = omitGLPrefix(ext);
if(ext.startsWith(prefix))
if(ext.startsWith(prefix + "_"))
{
ext.remove(0, prefix.size() + 1);
if(!first) os << ", ";
Expand Down

0 comments on commit 140c011

Please sign in to comment.