From 290c31d9162a6e81adbf57530feeff9393d2c732 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 27 Apr 2018 11:33:45 -0700 Subject: [PATCH 1/4] don't spam resetSensors --- interface/src/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c38caca090..18ba4958aa 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3554,7 +3554,7 @@ void Application::keyPressEvent(QKeyEvent* event) { } else { showCursor(Cursor::Icon::DEFAULT); } - } else { + } else if (!event->isAutoRepeat()){ resetSensors(true); } break; From 6a55e67ce9cd01ed29825d14889a1d0d2ad902c6 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Sat, 5 May 2018 16:39:03 -0700 Subject: [PATCH 2/4] avoid misaligned pointer deref --- libraries/gpu/src/gpu/Texture_ktx.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index 0822af3cfb..bb081637be 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -46,13 +46,14 @@ struct GPUKTXPayload { memcpy(data, &_samplerDesc, sizeof(Sampler::Desc)); data += sizeof(Sampler::Desc); - + // We can't copy the bitset in Texture::Usage in a crossplateform manner // So serialize it manually - *(uint32*)data = _usage._flags.to_ulong(); + uint32 usageData = _usage._flags.to_ulong(); + memcpy(data, &usageData, sizeof(uint32)); data += sizeof(uint32); - *(TextureUsageType*)data = _usageType; + memcpy(data, &_usageType, sizeof(TextureUsageType)); data += sizeof(TextureUsageType); return data + PADDING; @@ -77,10 +78,12 @@ struct GPUKTXPayload { memcpy(&_samplerDesc, data, sizeof(Sampler::Desc)); data += sizeof(Sampler::Desc); - + // We can't copy the bitset in Texture::Usage in a crossplateform manner // So unserialize it manually - _usage = Texture::Usage(*(const uint32*)data); + uint32 usageData; + memcpy(&usageData, data, sizeof(uint32)); + _usage = Texture::Usage(usageData); data += sizeof(uint32); _usageType = *(const TextureUsageType*)data; @@ -710,4 +713,4 @@ bool Texture::evalTextureFormat(const ktx::Header& header, Element& mipFormat, E return false; } return true; -} \ No newline at end of file +} From 677c99abd46e429090a4ebd3d85b2f7145e9ea6e Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Sat, 5 May 2018 20:50:54 -0700 Subject: [PATCH 3/4] use memcpy on _usageType as well --- libraries/gpu/src/gpu/Texture_ktx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index bb081637be..129c125411 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -86,7 +86,7 @@ struct GPUKTXPayload { _usage = Texture::Usage(usageData); data += sizeof(uint32); - _usageType = *(const TextureUsageType*)data; + memcpy(&_usageType, data, sizeof(TextureUsageType)); return true; } From fd4530e671b96d17af052ef7882fc674800a66f6 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Mon, 7 May 2018 14:39:31 -0700 Subject: [PATCH 4/4] MS3128: Remove vestigal Edit menu item --- scripts/system/edit.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 6bb815a597..523582836f 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -1165,17 +1165,11 @@ function setupModelMenus() { }); modelMenuAddedDelete = true; } - Menu.addMenuItem({ - menuName: "Edit", - menuItemName: "Entity List...", - afterItem: "Entities", - grouping: "Advanced" - }); Menu.addMenuItem({ menuName: "Edit", menuItemName: "Parent Entity to Last", - afterItem: "Entity List...", + afterItem: "Entities", grouping: "Advanced" }); @@ -1297,7 +1291,6 @@ function cleanupModelMenus() { Menu.removeMenuItem("Edit", "Parent Entity to Last"); Menu.removeMenuItem("Edit", "Unparent Entity"); - Menu.removeMenuItem("Edit", "Entity List..."); Menu.removeMenuItem("Edit", "Allow Selecting of Large Models"); Menu.removeMenuItem("Edit", "Allow Selecting of Small Models"); Menu.removeMenuItem("Edit", "Allow Selecting of Lights"); @@ -1659,8 +1652,6 @@ function handeMenuEvent(menuItem) { Window.promptTextChanged.connect(onPromptTextChanged); Window.promptAsync("URL of SVO to import", ""); } - } else if (menuItem === "Entity List...") { - entityListTool.toggleVisible(); } else if (menuItem === "Select All Entities In Box") { selectAllEtitiesInCurrentSelectionBox(false); } else if (menuItem === "Select All Entities Touching Box") {