Merge pull request #322 from michaelrgb/forpull

Get the real dimensions of the ANativeWindow.
This commit is contained in:
Baldur Karlsson
2016-08-10 17:44:02 +02:00
committed by GitHub
2 changed files with 8 additions and 3 deletions
+1
View File
@@ -18,6 +18,7 @@ if(ANDROID)
PRIVATE m
PRIVATE dl
PRIVATE log
PRIVATE android
PRIVATE ${CMAKE_THREAD_LIBS_INIT})
elseif(APPLE)
list(APPEND RDOC_LIBRARIES
+7 -3
View File
@@ -47,9 +47,13 @@ void VulkanReplay::OutputWindow::CreateSurface(VkInstance inst)
void VulkanReplay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h)
{
w = 500;
h = 500; // FIXME
RDCLOG("VulkanReplay::GetOutputWindowDimensions: %i, %i", w, h);
if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end())
return;
OutputWindow &outw = m_OutputWindows[id];
w = ANativeWindow_getWidth(outw.wnd);
h = ANativeWindow_getHeight(outw.wnd);
}
const char *VulkanLibraryName = "libvulkan.so";