commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
33
include/modules/viewer_base/viewer_base_config.cpp
Normal file
33
include/modules/viewer_base/viewer_base_config.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include "viewer_base/viewer_base.h"
|
||||
#include "core/renderer.h"
|
||||
|
||||
using namespace GS;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool ViewerBase::LoadViewerConfig(const char *path)
|
||||
{
|
||||
if (!NML::Parser::Load(path, config_file))
|
||||
return false;
|
||||
|
||||
NML::Tag *tag;
|
||||
if ((tag = config_file.GetTypedTag("Fullscreen", Variant::VariantBool)) != NULL)
|
||||
fullscreen = tag->GetBool();
|
||||
if ((tag = config_file.GetTypedTag("Width", Variant::VariantInteger)) != NULL)
|
||||
width = tag->GetInteger();
|
||||
if ((tag = config_file.GetTypedTag("Height", Variant::VariantInteger)) != NULL)
|
||||
height = tag->GetInteger();
|
||||
if ((tag = config_file.GetTypedTag("AspectRatio", Variant::VariantFloat)) != NULL)
|
||||
aspect_ratio = tag->GetReal();
|
||||
|
||||
if (renderer)
|
||||
renderer->SetGlobalAspectRatio(aspect_ratio);
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user