summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2024-09-17 19:16:25 +0200
committerKitty Barnett <develop@catznip.com>2024-09-17 19:16:25 +0200
commit25f8cbece402c0987e2035eb7721e21a9d2761c3 (patch)
treef2408e7d1f7b58f49f8cefc5dda7dd56d08c98f8 /indra/llwindow
parent6f4d7c2d6d363aee60d2f3d1fe4ed4a251aaa11b (diff)
parentf378d2f95ad751ccf7456f79baba61d6c39f5c36 (diff)
Merge branch 'develop' into rlva/base
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/CMakeLists.txt3
-rw-r--r--indra/llwindow/lldragdropwin32.h4
-rw-r--r--indra/llwindow/llkeyboardwin32.cpp2
-rw-r--r--indra/llwindow/llwindowwin32.cpp12
-rw-r--r--indra/llwindow/llwindowwin32.h2
5 files changed, 17 insertions, 6 deletions
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index 7b1430c67c..2996f58fe0 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -17,6 +17,7 @@ include(LLImage)
include(LLWindow)
include(UI)
include(ViewerMiscLibs)
+include(GLM)
set(llwindow_SOURCE_FILES
llcursortypes.cpp
@@ -54,7 +55,7 @@ set(llwindow_LINK_LIBRARIES
llrender
llfilesystem
llxml
- ll::glh_linear
+ ll::glm
ll::glext
ll::uilibraries
ll::SDL
diff --git a/indra/llwindow/lldragdropwin32.h b/indra/llwindow/lldragdropwin32.h
index 1b30dced27..16d016677b 100644
--- a/indra/llwindow/lldragdropwin32.h
+++ b/indra/llwindow/lldragdropwin32.h
@@ -31,7 +31,7 @@
#ifndef LL_LLDRAGDROP32_H
#define LL_LLDRAGDROP32_H
-#include "llwin32headerslean.h"
+#include "llwin32headers.h"
#include <ole2.h>
class LLDragDropWin32
@@ -54,7 +54,7 @@ class LLDragDropWin32
#ifndef LL_LLDRAGDROP32_H
#define LL_LLDRAGDROP32_H
-#include "llwin32headerslean.h"
+#include "llwin32headers.h"
#include <ole2.h>
// impostor class that does nothing
diff --git a/indra/llwindow/llkeyboardwin32.cpp b/indra/llwindow/llkeyboardwin32.cpp
index ec0055fe60..8d6b8d9b93 100644
--- a/indra/llwindow/llkeyboardwin32.cpp
+++ b/indra/llwindow/llkeyboardwin32.cpp
@@ -28,7 +28,7 @@
#include "linden_common.h"
-#include "llwin32headerslean.h"
+#include "llwin32headers.h"
#include "llkeyboardwin32.h"
#include "llwindowcallbacks.h"
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 76abf5eaa2..0b6ee541c0 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -3710,6 +3710,10 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
//
// "This is why I'm doing it this way, instead of what you would think would be more obvious..."
// (C) Nat Goodspeed
+ if (!IsWindow(sWindowHandleForMessageBox))
+ {
+ sWindowHandleForMessageBox = NULL;
+ }
int retval_win = MessageBoxW(sWindowHandleForMessageBox, // HWND
ll_convert_string_to_wide(text).c_str(),
ll_convert_string_to_wide(caption).c_str(),
@@ -4638,6 +4642,12 @@ void LLWindowWin32::LLWindowWin32Thread::checkDXMem()
{
if (!mGLReady || mGotGLBuffer) { return; }
+ if ((gGLManager.mHasAMDAssociations || gGLManager.mHasNVXGpuMemoryInfo) && gGLManager.mVRAM != 0)
+ { // OpenGL already told us the memory budget, don't ask DX
+ mGotGLBuffer = true;
+ return;
+ }
+
IDXGIFactory4* p_factory = nullptr;
HRESULT res = CreateDXGIFactory1(__uuidof(IDXGIFactory4), (void**)&p_factory);
@@ -4734,7 +4744,7 @@ void LLWindowWin32::LLWindowWin32Thread::run()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_WIN32;
- // Check memory budget using DirectX
+ // Check memory budget using DirectX if OpenGL doesn't have the means to tell us
checkDXMem();
if (mWindowHandleThrd != 0)
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 287402faa0..36e89e4586 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -28,7 +28,7 @@
#define LL_LLWINDOWWIN32_H
// Limit Windows API to small and manageable set.
-#include "llwin32headerslean.h"
+#include "llwin32headers.h"
#include "llwindow.h"
#include "llwindowcallbacks.h"