Move no graphics setting to guiengine which is a better place
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
#include "guiengine/modaldialog.hpp"
|
||||
#include "guiengine/screen_keyboard.hpp"
|
||||
#include "input/input_manager.hpp"
|
||||
#include "modes/profile_world.hpp"
|
||||
#include "modes/world.hpp"
|
||||
#include "modes/profile_world.hpp"
|
||||
#include "network/network_config.hpp"
|
||||
#include "network/network_timer_synchronizer.hpp"
|
||||
#include "network/protocols/game_protocol.hpp"
|
||||
@@ -158,7 +158,7 @@ float MainLoop::getLimitedDt()
|
||||
float dt = 0;
|
||||
|
||||
// In profile mode without graphics, run with a fixed dt of 1/60
|
||||
if ((ProfileWorld::isProfileMode() && ProfileWorld::isNoGraphics()) ||
|
||||
if ((ProfileWorld::isProfileMode() && GUIEngine::isNoGraphics()) ||
|
||||
UserConfigParams::m_arena_ai_stats)
|
||||
{
|
||||
return 1.0f/60.0f;
|
||||
@@ -176,7 +176,7 @@ float MainLoop::getLimitedDt()
|
||||
{
|
||||
#ifndef SERVER_ONLY
|
||||
if (UserConfigParams::m_artist_debug_mode &&
|
||||
!ProfileWorld::isNoGraphics())
|
||||
!GUIEngine::isNoGraphics())
|
||||
{
|
||||
core::stringw err = L"System clock running backwards in"
|
||||
" networking game.";
|
||||
@@ -435,7 +435,7 @@ void MainLoop::run()
|
||||
|
||||
if (!m_request_abort)
|
||||
{
|
||||
if (!ProfileWorld::isNoGraphics())
|
||||
if (!GUIEngine::isNoGraphics())
|
||||
{
|
||||
SFXManager::get()->quickSound("anvil");
|
||||
if (!STKHost::get()->getErrorMessage().empty())
|
||||
@@ -474,7 +474,7 @@ void MainLoop::run()
|
||||
|
||||
if (exist_host == true)
|
||||
{
|
||||
if (!ProfileWorld::isNoGraphics())
|
||||
if (!GUIEngine::isNoGraphics())
|
||||
{
|
||||
StateManager::get()->resetAndSetStack(
|
||||
NetworkConfig::get()->getResetScreens().data());
|
||||
@@ -495,7 +495,7 @@ void MainLoop::run()
|
||||
if (!m_abort)
|
||||
{
|
||||
float frame_duration = num_steps * dt;
|
||||
if (!ProfileWorld::isNoGraphics())
|
||||
if (!GUIEngine::isNoGraphics())
|
||||
{
|
||||
PROFILER_PUSH_CPU_MARKER("Update race", 0, 255, 255);
|
||||
if (World::getWorld())
|
||||
@@ -610,7 +610,7 @@ void MainLoop::run()
|
||||
|
||||
// Handle controller the last to avoid slow PC sending actions too
|
||||
// late
|
||||
if (!ProfileWorld::isNoGraphics())
|
||||
if (!GUIEngine::isNoGraphics())
|
||||
{
|
||||
// User aborted (e.g. closed window)
|
||||
bool abort = !irr_driver->getDevice()->run();
|
||||
@@ -662,7 +662,7 @@ void MainLoop::renderGUI(int phase, int loop_index, int loop_size)
|
||||
#else
|
||||
if ((NetworkConfig::get()->isNetworking() &&
|
||||
NetworkConfig::get()->isServer()) ||
|
||||
ProfileWorld::isNoGraphics())
|
||||
GUIEngine::isNoGraphics())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user