mirror of
https://github.com/glest/glest-source.git
synced 2025-09-28 00:19:00 +02:00
- bugfix to allow headless server to load a texture for new tilesets where they must read it to determine parts.
- converted asserts to exceptions
This commit is contained in:
@@ -15,16 +15,21 @@
|
||||
#include "graphics_factory.h"
|
||||
#include <stdexcept>
|
||||
#include "util.h"
|
||||
#include "platform_util.h"
|
||||
#include "leak_dumper.h"
|
||||
|
||||
using namespace Shared::Platform;
|
||||
using namespace Shared::Util;
|
||||
|
||||
namespace Shared { namespace Graphics {
|
||||
|
||||
// =====================================================
|
||||
// class FontManager
|
||||
// =====================================================
|
||||
FontManager::FontManager() {
|
||||
assert(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false);
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
|
||||
throw megaglest_runtime_error("Loading graphics in headless server mode not allowed!");
|
||||
}
|
||||
fonts.clear();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user