mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-23 12:18:37 -05:00
OSX fixes
This commit is contained in:
parent
8960d49f84
commit
005ce358ed
@ -197,13 +197,13 @@ void GLFont::loadFont(const std::wstring& fontFile) {
|
||||
|
||||
|
||||
std::wifstream input;
|
||||
input.open(fontFileSource.c_str(), std::ios::in);
|
||||
std::string inpFileStr(fontFileSource.begin(), fontFileSource.end());
|
||||
input.open(inpFileStr, std::ios::in);
|
||||
|
||||
std::wstring op;
|
||||
|
||||
while (!input.eof()) {
|
||||
input >> op;
|
||||
|
||||
if (op == L"info") {
|
||||
std::wstring info_param_str;
|
||||
getline(input, info_param_str);
|
||||
@ -569,8 +569,13 @@ void GLFont::drawString(const std::wstring& str, float xpos, float ypos, int pxH
|
||||
// Draw string, immediate, 8 bit version
|
||||
void GLFont::drawString(const std::string& str, float xpos, float ypos, int pxHeight, Align hAlign, Align vAlign, int vpx, int vpy, bool cacheable) {
|
||||
|
||||
//This a thread-safe wsTmp buffer to convert to wstring, reusing the same memory
|
||||
#ifdef WIN32
|
||||
//This a thread-safe wsTmp buffer to convert to wstring, reusing the same memory, unsupported: OSX?
|
||||
static thread_local std::wstring wsTmp;
|
||||
#else
|
||||
std::wstring wsTmp;
|
||||
#endif
|
||||
|
||||
wsTmp.clear();
|
||||
wsTmp.assign(str.begin(), str.end());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user