mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:17:02 +02:00
merge upstream/master into andrew/thermonuclear
This commit is contained in:
commit
d9b57de649
11 changed files with 90 additions and 21 deletions
|
@ -425,7 +425,7 @@ var toolBar = (function () {
|
||||||
placingEntityID = Entities.addEntity({
|
placingEntityID = Entities.addEntity({
|
||||||
type: "Text",
|
type: "Text",
|
||||||
position: grid.snapToSurface(grid.snapToGrid(position, false, DEFAULT_DIMENSIONS), DEFAULT_DIMENSIONS),
|
position: grid.snapToSurface(grid.snapToGrid(position, false, DEFAULT_DIMENSIONS), DEFAULT_DIMENSIONS),
|
||||||
dimensions: { x: 0.5, y: 0.3, z: 0.01 },
|
dimensions: { x: 0.65, y: 0.3, z: 0.01 },
|
||||||
backgroundColor: { red: 64, green: 64, blue: 64 },
|
backgroundColor: { red: 64, green: 64, blue: 64 },
|
||||||
textColor: { red: 255, green: 255, blue: 255 },
|
textColor: { red: 255, green: 255, blue: 255 },
|
||||||
text: "some text",
|
text: "some text",
|
||||||
|
|
|
@ -168,14 +168,16 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload='loaded();'>
|
<body onload='loaded();'>
|
||||||
<div>
|
<div id="entity-list-header">
|
||||||
<input type="button" id="refresh" value="Refresh"></button>
|
<input type="button" id="refresh" value="Refresh"></button>
|
||||||
<input type="button" id="teleport" value="Teleport"></button>
|
<input type="button" id="teleport" value="Teleport"></button>
|
||||||
<input type="button" id="delete" style="background-color: rgb(244, 64, 64); float: right" value="Delete"></button>
|
<input type="button" id="delete" style="background-color: rgb(244, 64, 64); float: right" value="Delete"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="entity-list">
|
<div id="entity-list">
|
||||||
<input type="text" class="search" id="filter" placeholder="Filter" />
|
<div id="search-area">
|
||||||
|
<input type="text" class="search" id="filter" placeholder="Filter" />
|
||||||
|
</div>
|
||||||
<table id="entity-table">
|
<table id="entity-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -86,6 +86,20 @@ input[type=button] {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#entity-list-header {
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-area {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.5em;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#search-area input {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
textarea, input {
|
textarea, input {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1.5pt;
|
padding: 1.5pt;
|
||||||
|
@ -120,6 +134,7 @@ table#entity-table {
|
||||||
}
|
}
|
||||||
|
|
||||||
#entity-table tr.selected {
|
#entity-table tr.selected {
|
||||||
|
color: rgb(43, 43, 43);
|
||||||
background-color: #AAA;
|
background-color: #AAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,18 +156,27 @@ public:
|
||||||
bool nativeEventFilter(const QByteArray &eventType, void* msg, long* result) Q_DECL_OVERRIDE {
|
bool nativeEventFilter(const QByteArray &eventType, void* msg, long* result) Q_DECL_OVERRIDE {
|
||||||
if (eventType == "windows_generic_MSG") {
|
if (eventType == "windows_generic_MSG") {
|
||||||
MSG* message = (MSG*)msg;
|
MSG* message = (MSG*)msg;
|
||||||
|
|
||||||
if (message->message == UWM_IDENTIFY_INSTANCES) {
|
if (message->message == UWM_IDENTIFY_INSTANCES) {
|
||||||
*result = UWM_IDENTIFY_INSTANCES;
|
*result = UWM_IDENTIFY_INSTANCES;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (message->message == WM_SHOWWINDOW) {
|
|
||||||
Application::getInstance()->getWindow()->showNormal();
|
if (message->message == UWM_SHOW_APPLICATION) {
|
||||||
|
MainWindow* applicationWindow = Application::getInstance()->getWindow();
|
||||||
|
if (applicationWindow->isMinimized()) {
|
||||||
|
applicationWindow->showNormal(); // Restores to windowed or maximized state appropriately.
|
||||||
|
}
|
||||||
|
Application::getInstance()->setActiveWindow(applicationWindow); // Flashes the taskbar icon if not focus.
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message->message == WM_COPYDATA) {
|
if (message->message == WM_COPYDATA) {
|
||||||
COPYDATASTRUCT* pcds = (COPYDATASTRUCT*)(message->lParam);
|
COPYDATASTRUCT* pcds = (COPYDATASTRUCT*)(message->lParam);
|
||||||
QUrl url = QUrl((const char*)(pcds->lpData));
|
QUrl url = QUrl((const char*)(pcds->lpData));
|
||||||
if (url.isValid() && url.scheme() == HIFI_URL_SCHEME) {
|
if (url.isValid() && url.scheme() == HIFI_URL_SCHEME) {
|
||||||
DependencyManager::get<AddressManager>()->handleLookupString(url.toString());
|
DependencyManager::get<AddressManager>()->handleLookupString(url.toString());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,8 @@ static const QString INFO_EDIT_ENTITIES_PATH = "html/edit-entities-commands.html
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
static const UINT UWM_IDENTIFY_INSTANCES =
|
static const UINT UWM_IDENTIFY_INSTANCES =
|
||||||
RegisterWindowMessage("UWM_IDENTIFY_INSTANCES_{8AB82783-B74A-4258-955B-8188C22AA0D6}");
|
RegisterWindowMessage("UWM_IDENTIFY_INSTANCES_{8AB82783-B74A-4258-955B-8188C22AA0D6}");
|
||||||
|
static const UINT UWM_SHOW_APPLICATION =
|
||||||
|
RegisterWindowMessage("UWM_SHOW_APPLICATION_{71123FD6-3DA8-4DC1-9C27-8A12A6250CBA}");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
|
|
|
@ -111,7 +111,7 @@ void drawText(int x, int y, float scale, float radians, int mono,
|
||||||
glRotated(double(radians * DEGREES_PER_RADIAN), 0.0, 0.0, 1.0);
|
glRotated(double(radians * DEGREES_PER_RADIAN), 0.0, 0.0, 1.0);
|
||||||
glScalef(scale / 0.1f, scale / 0.1f, 1.0f);
|
glScalef(scale / 0.1f, scale / 0.1f, 1.0f);
|
||||||
|
|
||||||
glm::vec4 colorV4 = {color[0], color[1], color[3], 1.0f };
|
glm::vec4 colorV4 = {color[0], color[1], color[2], 1.0f };
|
||||||
textRenderer(mono)->draw(0, 0, string, colorV4);
|
textRenderer(mono)->draw(0, 0, string, colorV4);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QCommandLineParser>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
@ -36,7 +37,7 @@ static BOOL CALLBACK enumWindowsCallback(HWND hWnd, LPARAM lParam) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, const char * argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// Run only one instance of Interface at a time.
|
// Run only one instance of Interface at a time.
|
||||||
HANDLE mutex = CreateMutex(NULL, FALSE, "High Fidelity Interface");
|
HANDLE mutex = CreateMutex(NULL, FALSE, "High Fidelity Interface");
|
||||||
|
@ -46,15 +47,32 @@ int main(int argc, const char * argv[]) {
|
||||||
HWND otherInstance = NULL;
|
HWND otherInstance = NULL;
|
||||||
EnumWindows(enumWindowsCallback, (LPARAM)&otherInstance);
|
EnumWindows(enumWindowsCallback, (LPARAM)&otherInstance);
|
||||||
if (otherInstance) {
|
if (otherInstance) {
|
||||||
ShowWindow(otherInstance, SW_RESTORE);
|
// Show other instance.
|
||||||
SetForegroundWindow(otherInstance);
|
SendMessage(otherInstance, UWM_SHOW_APPLICATION, 0, 0);
|
||||||
|
|
||||||
QUrl url = QUrl(argv[1]);
|
// Send command line --url value to other instance.
|
||||||
if (url.isValid() && url.scheme() == HIFI_URL_SCHEME) {
|
if (argc >= 3) {
|
||||||
COPYDATASTRUCT cds;
|
QStringList arguments;
|
||||||
cds.cbData = strlen(argv[1]) + 1;
|
for (int i = 0; i < argc; i += 1) {
|
||||||
cds.lpData = (PVOID)argv[1];
|
arguments << argv[i];
|
||||||
SendMessage(otherInstance, WM_COPYDATA, 0, (LPARAM)&cds);
|
}
|
||||||
|
|
||||||
|
QCommandLineParser parser;
|
||||||
|
QCommandLineOption urlOption("url", "", "value");
|
||||||
|
parser.addOption(urlOption);
|
||||||
|
parser.process(arguments);
|
||||||
|
|
||||||
|
if (parser.isSet(urlOption)) {
|
||||||
|
QUrl url = QUrl(parser.value(urlOption));
|
||||||
|
if (url.isValid() && url.scheme() == HIFI_URL_SCHEME) {
|
||||||
|
QByteArray urlBytes = url.toString().toLatin1();
|
||||||
|
const char* urlChars = urlBytes.data();
|
||||||
|
COPYDATASTRUCT cds;
|
||||||
|
cds.cbData = urlBytes.length() + 1;
|
||||||
|
cds.lpData = (PVOID)urlChars;
|
||||||
|
SendMessage(otherInstance, WM_COPYDATA, 0, (LPARAM)&cds);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -271,7 +271,7 @@ void Stats::display(
|
||||||
// TODO: the display of these timing details should all be moved to JavaScript
|
// TODO: the display of these timing details should all be moved to JavaScript
|
||||||
if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) {
|
if (_expanded && Menu::getInstance()->isOptionChecked(MenuOption::DisplayTimingDetails)) {
|
||||||
// Timing details...
|
// Timing details...
|
||||||
verticalOffset += STATS_PELS_PER_LINE * 4; // skip 4 lines to be under the other columns
|
verticalOffset += STATS_PELS_PER_LINE * 6; // skip 6 lines to be under the other columns
|
||||||
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font,
|
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font,
|
||||||
"-------------------------------------------------------- Function "
|
"-------------------------------------------------------- Function "
|
||||||
"------------------------------------------------------- --msecs- -calls--", color);
|
"------------------------------------------------------- --msecs- -calls--", color);
|
||||||
|
@ -294,13 +294,14 @@ void Stats::display(
|
||||||
j.toBack();
|
j.toBack();
|
||||||
while (j.hasPrevious()) {
|
while (j.hasPrevious()) {
|
||||||
j.previous();
|
j.previous();
|
||||||
|
QChar noBreakingSpace = QChar::Nbsp;
|
||||||
QString functionName = j.value();
|
QString functionName = j.value();
|
||||||
const PerformanceTimerRecord& record = allRecords.value(functionName);
|
const PerformanceTimerRecord& record = allRecords.value(functionName);
|
||||||
|
|
||||||
QString perfLine = QString("%1: %2 [%3]").
|
QString perfLine = QString("%1: %2 [%3]").
|
||||||
arg(QString(qPrintable(functionName)), 120).
|
arg(QString(qPrintable(functionName)), 120, noBreakingSpace).
|
||||||
arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3).
|
arg((float)record.getMovingAverage() / (float)USECS_PER_MSEC, 8, 'f', 3, noBreakingSpace).
|
||||||
arg(record.getCount(), 6);
|
arg((int)record.getCount(), 6, 10, noBreakingSpace);
|
||||||
|
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color);
|
drawText(columnOneHorizontalOffset, verticalOffset, scale, rotation, font, perfLine.toUtf8().constData(), color);
|
||||||
|
|
|
@ -135,6 +135,15 @@ AudioClient::AudioClient() :
|
||||||
updateTimer->start(DEVICE_CHECK_INTERVAL_MSECS);
|
updateTimer->start(DEVICE_CHECK_INTERVAL_MSECS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AudioClient::~AudioClient() {
|
||||||
|
if (_gverbLocal) {
|
||||||
|
gverb_free(_gverbLocal);
|
||||||
|
}
|
||||||
|
if (_gverb) {
|
||||||
|
gverb_free(_gverb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AudioClient::reset() {
|
void AudioClient::reset() {
|
||||||
_receivedAudioStream.reset();
|
_receivedAudioStream.reset();
|
||||||
_stats.reset();
|
_stats.reset();
|
||||||
|
@ -522,10 +531,17 @@ bool AudioClient::switchOutputToAudioDevice(const QString& outputDeviceName) {
|
||||||
|
|
||||||
void AudioClient::initGverb() {
|
void AudioClient::initGverb() {
|
||||||
// Initialize a new gverb instance
|
// Initialize a new gverb instance
|
||||||
|
if (_gverbLocal) {
|
||||||
|
gverb_free(_gverbLocal);
|
||||||
|
}
|
||||||
_gverbLocal = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
|
_gverbLocal = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
|
||||||
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
|
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
|
||||||
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
|
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
|
||||||
_reverbOptions->getTailLevel());
|
_reverbOptions->getTailLevel());
|
||||||
|
|
||||||
|
if (_gverb) {
|
||||||
|
gverb_free(_gverb);
|
||||||
|
}
|
||||||
_gverb = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
|
_gverb = gverb_new(_outputFormat.sampleRate(), _reverbOptions->getMaxRoomSize(), _reverbOptions->getRoomSize(),
|
||||||
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
|
_reverbOptions->getReverbTime(), _reverbOptions->getDamping(), _reverbOptions->getSpread(),
|
||||||
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
|
_reverbOptions->getInputBandwidth(), _reverbOptions->getEarlyLevel(),
|
||||||
|
|
|
@ -186,6 +186,7 @@ signals:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AudioClient();
|
AudioClient();
|
||||||
|
~AudioClient();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void outputFormatChanged();
|
void outputFormatChanged();
|
||||||
|
|
|
@ -202,14 +202,19 @@ void AddressManager::goToAddressFromObject(const QVariantMap& dataObject, const
|
||||||
|
|
||||||
if (!domainObject.isEmpty()) {
|
if (!domainObject.isEmpty()) {
|
||||||
const QString DOMAIN_NETWORK_ADDRESS_KEY = "network_address";
|
const QString DOMAIN_NETWORK_ADDRESS_KEY = "network_address";
|
||||||
|
const QString DOMAIN_NETWORK_PORT_KEY = "network_port";
|
||||||
const QString DOMAIN_ICE_SERVER_ADDRESS_KEY = "ice_server_address";
|
const QString DOMAIN_ICE_SERVER_ADDRESS_KEY = "ice_server_address";
|
||||||
|
|
||||||
if (domainObject.contains(DOMAIN_NETWORK_ADDRESS_KEY)) {
|
if (domainObject.contains(DOMAIN_NETWORK_ADDRESS_KEY)) {
|
||||||
QString domainHostname = domainObject[DOMAIN_NETWORK_ADDRESS_KEY].toString();
|
QString domainHostname = domainObject[DOMAIN_NETWORK_ADDRESS_KEY].toString();
|
||||||
|
|
||||||
|
quint16 domainPort = domainObject.contains(DOMAIN_NETWORK_PORT_KEY)
|
||||||
|
? domainObject[DOMAIN_NETWORK_PORT_KEY].toUInt()
|
||||||
|
: DEFAULT_DOMAIN_SERVER_PORT;
|
||||||
|
|
||||||
qDebug() << "Possible domain change required to connect to" << domainHostname
|
qDebug() << "Possible domain change required to connect to" << domainHostname
|
||||||
<< "on" << DEFAULT_DOMAIN_SERVER_PORT;
|
<< "on" << domainPort;
|
||||||
emit possibleDomainChangeRequired(domainHostname, DEFAULT_DOMAIN_SERVER_PORT);
|
emit possibleDomainChangeRequired(domainHostname, domainPort);
|
||||||
} else {
|
} else {
|
||||||
QString iceServerAddress = domainObject[DOMAIN_ICE_SERVER_ADDRESS_KEY].toString();
|
QString iceServerAddress = domainObject[DOMAIN_ICE_SERVER_ADDRESS_KEY].toString();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue