Skip to content

Commit

Permalink
Fixed|All Games: Server doesn't have the DisplayMode module available
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 30, 2018
1 parent 512b1d5 commit 1fcff2a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions doomsday/apps/plugins/common/src/hud/widgets/automapwidget.cpp
Expand Up @@ -213,7 +213,7 @@ DENG2_PIMPL(AutomapWidget)
{
AutomapStyle *style = nullptr;

float dpiFactor; // DisplayMode.DPI_FACTOR
float dpiFactor = 1.f; // DisplayMode.DPI_FACTOR

//DGLuint lists[NUM_MAP_OBJECTLISTS]; ///< Each list contains one or more of given type of automap wi.
bool needBuildLists = false; ///< @c true= force a rebuild of all lists.
Expand Down Expand Up @@ -269,11 +269,17 @@ DENG2_PIMPL(AutomapWidget)

Impl(Public *i) : Base(i)
{
//de::zap(lists);
de::zap(bounds);
de::zap(viewAABB);
using namespace de;

dpiFactor = de::ScriptSystem::get().nativeModule("DisplayMode").getf("DPI_FACTOR");
zap(bounds);
zap(viewAABB);

auto &ds = ScriptSystem::get();

if (ds.nativeModuleExists("DisplayMode"))
{
dpiFactor = ds.nativeModule("DisplayMode").getf("DPI_FACTOR");
}
}

~Impl()
Expand Down

0 comments on commit 1fcff2a

Please sign in to comment.