Try to fix OSX no-graphics STK

This commit is contained in:
Benau
2018-03-01 10:10:08 +08:00
parent 3141b67f89
commit 9d93e0112c
2 changed files with 3 additions and 2 deletions

View File

@@ -28,6 +28,7 @@
#include "graphics/stk_tex_manager.hpp"
#include "guiengine/engine.hpp"
#include "guiengine/skin.hpp"
#include "modes/profile_world.hpp"
#include "utils/string_utils.hpp"
#include <array>
@@ -208,7 +209,7 @@ void FontWithFace::insertGlyph(wchar_t c, const GlyphInfo& gi)
const unsigned int cur_tex = m_spritebank->getTextureCount() -1;
#ifndef SERVER_ONLY
if (bits->buffer != NULL)
if (bits->buffer != NULL && !ProfileWorld::isNoGraphics())
{
video::ITexture* tex = m_spritebank->getTexture(cur_tex);
glBindTexture(GL_TEXTURE_2D, tex->getOpenGLTextureName());

View File

@@ -45,7 +45,7 @@ std::string SeparateProcess::getCurrentExecutableLocation()
#elif defined (__APPLE__)
char path[1024];
unsigned buf_size = 1024;
if (_NSGetExecutablePath(path, &buf_size) != 0)
if (_NSGetExecutablePath(path, &buf_size) == 0)
{
return file_manager->getFileSystem()->getAbsolutePath(path).c_str();
}