mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
register the shared message handler to fix voxel-server output
This commit is contained in:
parent
7cec2f5ffd
commit
fa155adc8c
3 changed files with 12 additions and 2 deletions
|
@ -188,6 +188,10 @@ bool cmdOptionExists(int argc, const char * argv[],const char* option) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void sharedMessageHandler(QtMsgType type, const char* message) {
|
||||
fprintf(stdout, "%s", message);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Function: createVoxelEditMessage()
|
||||
// Description: creates an "insert" or "remove" voxel message for a voxel code
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
#ifndef __hifi__SharedUtil__
|
||||
#define __hifi__SharedUtil__
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Systime.h"
|
||||
|
@ -66,6 +68,8 @@ void loadRandomIdentifier(unsigned char* identifierBuffer, int numBytes);
|
|||
const char* getCmdOption(int argc, const char * argv[],const char* option);
|
||||
bool cmdOptionExists(int argc, const char * argv[],const char* option);
|
||||
|
||||
void sharedMessageHandler(QtMsgType type, const char* message);
|
||||
|
||||
struct VoxelDetail {
|
||||
float x;
|
||||
float y;
|
||||
|
|
|
@ -377,7 +377,9 @@ void attachVoxelNodeDataToNode(Node* newNode) {
|
|||
int main(int argc, const char * argv[]) {
|
||||
|
||||
pthread_mutex_init(&::treeLock, NULL);
|
||||
|
||||
|
||||
qInstallMsgHandler(sharedMessageHandler);
|
||||
|
||||
NodeList* nodeList = NodeList::createInstance(NODE_TYPE_VOXEL_SERVER, VOXEL_LISTEN_PORT);
|
||||
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue