Merge branch 'release/maint-a' of https://github.com/secondlife/viewer
# Conflicts: # indra/llwindow/llwindow.cpp # indra/llwindow/llwindow.h # indra/llwindow/llwindowmacosx.cpp # indra/llwindow/llwindowmacosx.h # indra/llwindow/llwindowwin32.cpp # indra/llwindow/llwindowwin32.h # indra/newview/llviewerwindow.cppmaster
commit
fa20e5ce3b
|
|
@ -418,7 +418,6 @@ LLWindow* LLWindowManager::createWindow(
|
|||
bool ignore_pixel_depth,
|
||||
U32 fsaa_samples,
|
||||
U32 max_cores,
|
||||
U32 max_vram,
|
||||
F32 max_gl_version,
|
||||
bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
|
||||
{
|
||||
|
|
@ -433,18 +432,18 @@ LLWindow* LLWindowManager::createWindow(
|
|||
#elif LL_SDL
|
||||
new_window = new LLWindowSDL(callbacks,
|
||||
title, x, y, width, height, flags,
|
||||
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram);
|
||||
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
|
||||
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
#elif LL_WINDOWS
|
||||
new_window = new LLWindowWin32(callbacks,
|
||||
title, name, x, y, width, height, flags,
|
||||
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_vram, max_gl_version);
|
||||
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_vram, max_gl_version, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_gl_version);
|
||||
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_cores, max_gl_version, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
#elif LL_DARWIN
|
||||
new_window = new LLWindowMacOSX(callbacks,
|
||||
title, name, x, y, width, height, flags,
|
||||
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram);
|
||||
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, max_vram, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
//fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples);
|
||||
fullscreen, clearBg, enable_vsync, use_gl, ignore_pixel_depth, fsaa_samples, useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -164,8 +164,6 @@ public:
|
|||
virtual F32 getPixelAspectRatio() = 0;
|
||||
virtual void setNativeAspectRatio(F32 aspect) = 0;
|
||||
|
||||
virtual void setMaxVRAMMegabytes(U32 max_vram) = 0;
|
||||
|
||||
virtual void beforeDialog() {}; // prepare to put up an OS dialog (if special measures are required, such as in fullscreen mode)
|
||||
virtual void afterDialog() {}; // undo whatever was done in beforeDialog()
|
||||
|
||||
|
|
@ -293,14 +291,14 @@ protected:
|
|||
|
||||
// Platform-neutral for accessing the platform specific message box
|
||||
S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type);
|
||||
const U32 OSMB_OK = 0;
|
||||
const U32 OSMB_OKCANCEL = 1;
|
||||
const U32 OSMB_YESNO = 2;
|
||||
constexpr U32 OSMB_OK = 0;
|
||||
constexpr U32 OSMB_OKCANCEL = 1;
|
||||
constexpr U32 OSMB_YESNO = 2;
|
||||
|
||||
const S32 OSBTN_YES = 0;
|
||||
const S32 OSBTN_NO = 1;
|
||||
const S32 OSBTN_OK = 2;
|
||||
const S32 OSBTN_CANCEL = 3;
|
||||
constexpr S32 OSBTN_YES = 0;
|
||||
constexpr S32 OSBTN_NO = 1;
|
||||
constexpr S32 OSBTN_OK = 2;
|
||||
constexpr S32 OSBTN_CANCEL = 3;
|
||||
|
||||
//
|
||||
// LLWindowManager
|
||||
|
|
@ -320,7 +318,6 @@ public:
|
|||
bool ignore_pixel_depth = false,
|
||||
U32 fsaa_samples = 0,
|
||||
U32 max_cores = 0,
|
||||
U32 max_vram = 0,
|
||||
F32 max_gl_version = 4.6f,
|
||||
bool useLegacyCursors = false); // <FS:LO> Legacy cursor setting from main program
|
||||
static bool destroyWindow(LLWindow* window);
|
||||
|
|
@ -337,6 +334,4 @@ extern const S32 gURLProtocolWhitelistCount;
|
|||
extern const std::string gURLProtocolWhitelist[];
|
||||
//extern const std::string gURLProtocolWhitelistHandler[];
|
||||
|
||||
void simpleEscapeString ( std::string& stringIn );
|
||||
|
||||
#endif // _LL_window_h_
|
||||
|
|
|
|||
|
|
@ -101,8 +101,6 @@ public:
|
|||
/*virtual*/ F32 getPixelAspectRatio() override { return 1.0f; }
|
||||
/*virtual*/ void setNativeAspectRatio(F32 ratio) override {}
|
||||
|
||||
void setMaxVRAMMegabytes(U32 max_vram) override {}
|
||||
|
||||
/*virtual*/ void *getPlatformWindow() override { return 0; }
|
||||
/*virtual*/ void bringToFront() override {}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,6 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
|
|||
bool enable_vsync, bool use_gl,
|
||||
bool ignore_pixel_depth,
|
||||
U32 fsaa_samples,
|
||||
U32 max_vram,
|
||||
bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
|
||||
: LLWindow(NULL, fullscreen, flags)
|
||||
, mUseLegacyCursors(useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
|
||||
|
|
|
|||
|
|
@ -100,8 +100,6 @@ public:
|
|||
F32 getPixelAspectRatio() override;
|
||||
void setNativeAspectRatio(F32 ratio) override { mOverrideAspectRatio = ratio; }
|
||||
|
||||
virtual void setMaxVRAMMegabytes(U32 max_vram) override {}
|
||||
|
||||
void beforeDialog() override;
|
||||
void afterDialog() override;
|
||||
|
||||
|
|
@ -157,7 +155,6 @@ protected:
|
|||
bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl,
|
||||
bool ignore_pixel_depth,
|
||||
U32 fsaa_samples,
|
||||
U32 max_vram,
|
||||
bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
~LLWindowMacOSX();
|
||||
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
|
|||
bool enable_vsync, bool use_gl,
|
||||
// <FS:LO> Legacy cursor setting from main program
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples,)
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors)
|
||||
: LLWindow(callbacks, fullscreen, flags),
|
||||
Lock_Display(NULL),
|
||||
//Unlock_Display(NULL), mGamma(1.0f)
|
||||
|
|
|
|||
|
|
@ -118,9 +118,6 @@ public:
|
|||
/*virtual*/ F32 getPixelAspectRatio();
|
||||
/*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; }
|
||||
|
||||
U32 getAvailableVRAMMegabytes() override { return 4096; };
|
||||
/*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) {}
|
||||
|
||||
/*virtual*/ void beforeDialog();
|
||||
/*virtual*/ void afterDialog();
|
||||
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks,
|
|||
bool enable_vsync, bool use_gl,
|
||||
// <FS:LO> Legacy cursor setting from main program
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples,)
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors)
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors)
|
||||
: LLWindow(callbacks, fullscreen, flags),
|
||||
Lock_Display(NULL),
|
||||
//Unlock_Display(NULL), mGamma(1.0f)
|
||||
|
|
|
|||
|
|
@ -120,8 +120,6 @@ public:
|
|||
/*virtual*/ F32 getPixelAspectRatio();
|
||||
/*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; }
|
||||
|
||||
/*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) {}
|
||||
|
||||
/*virtual*/ void beforeDialog();
|
||||
/*virtual*/ void afterDialog();
|
||||
|
||||
|
|
@ -166,7 +164,7 @@ protected:
|
|||
const std::string& title, int x, int y, int width, int height, U32 flags,
|
||||
bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl,
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples);
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_vram, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
~LLWindowSDL();
|
||||
|
||||
/*virtual*/ bool isValid();
|
||||
|
|
|
|||
|
|
@ -404,7 +404,6 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
|
|||
|
||||
using FuncType = std::function<void()>;
|
||||
// call GetMessage() and pull enqueue messages for later processing
|
||||
void gatherInput();
|
||||
HWND mWindowHandleThrd = NULL;
|
||||
HDC mhDCThrd = 0;
|
||||
|
||||
|
|
@ -412,8 +411,6 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
|
|||
// until after some graphics setup. See SL-20177. -Cosmic,2023-09-18
|
||||
bool mGLReady = false;
|
||||
bool mGotGLBuffer = false;
|
||||
|
||||
U32 mMaxVRAM = 0; // maximum amount of vram to allow in the "budget", or 0 for no maximum (see updateVRAMUsage)
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -425,7 +422,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
|
|||
bool ignore_pixel_depth,
|
||||
U32 fsaa_samples,
|
||||
U32 max_cores,
|
||||
U32 max_vram,
|
||||
F32 max_gl_version,
|
||||
bool useLegacyCursors) // <FS:LO> Legacy cursor setting from main program
|
||||
:
|
||||
|
|
@ -435,7 +431,6 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
|
|||
{
|
||||
sMainThreadId = LLThread::currentID();
|
||||
mWindowThread = new LLWindowWin32Thread();
|
||||
mWindowThread->mMaxVRAM = max_vram;
|
||||
|
||||
//MAINT-516 -- force a load of opengl32.dll just in case windows went sideways
|
||||
LoadLibrary(L"opengl32.dll");
|
||||
|
|
@ -4636,15 +4631,6 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList()
|
|||
// Fonts previously in getFontListSans() have moved to fonts.xml.
|
||||
return std::vector<std::string>();
|
||||
}
|
||||
|
||||
void LLWindowWin32::setMaxVRAMMegabytes(U32 max_vram)
|
||||
{
|
||||
if (mWindowThread)
|
||||
{
|
||||
mWindowThread->mMaxVRAM = max_vram;
|
||||
}
|
||||
}
|
||||
|
||||
// <FS:ND> Allow to query for window chrome sizes.
|
||||
void LLWindowWin32::getWindowChrome( U32 &aChromeW, U32 &aChromeH )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -108,8 +108,6 @@ public:
|
|||
/*virtual*/ F32 getPixelAspectRatio();
|
||||
/*virtual*/ void setNativeAspectRatio(F32 ratio) { mOverrideAspectRatio = ratio; }
|
||||
|
||||
/*virtual*/ void setMaxVRAMMegabytes(U32 max_vram) override;
|
||||
|
||||
/*virtual*/ bool dialogColorPicker(F32 *r, F32 *g, F32 *b );
|
||||
|
||||
/*virtual*/ void *getPlatformWindow();
|
||||
|
|
@ -143,13 +141,12 @@ protected:
|
|||
LLWindowWin32(LLWindowCallbacks* callbacks,
|
||||
const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags,
|
||||
bool fullscreen, bool clearBg, bool enable_vsync, bool use_gl,
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version);
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, U32 max_vram, F32 max_gl_version, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
//bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, F32 max_gl_version);
|
||||
bool ignore_pixel_depth, U32 fsaa_samples, U32 max_cores, F32 max_gl_version, bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
~LLWindowWin32();
|
||||
|
||||
//void initCursors();
|
||||
void initCursors(bool useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
void initInputDevices();
|
||||
HCURSOR loadColorCursor(LPCTSTR name);
|
||||
bool isValid();
|
||||
void moveWindow(const LLCoordScreen& position,const LLCoordScreen& size);
|
||||
|
|
@ -166,7 +163,6 @@ protected:
|
|||
|
||||
bool shouldPostQuit() { return mPostQuit; }
|
||||
|
||||
void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form);
|
||||
void fillCandidateForm(const LLCoordGL& caret, const LLRect& bounds, CANDIDATEFORM *form);
|
||||
void fillCharPosition(const LLCoordGL& caret, const LLRect& bounds, const LLRect& control, IMECHARPOSITION *char_position);
|
||||
void fillCompositionLogfont(LOGFONT *logfont);
|
||||
|
|
@ -181,10 +177,8 @@ protected:
|
|||
//
|
||||
|
||||
bool getClientRectInScreenSpace(RECT* rectp);
|
||||
void updateJoystick( );
|
||||
|
||||
static LRESULT CALLBACK mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_param, LPARAM l_param);
|
||||
static bool CALLBACK enumChildWindows(HWND h_wnd, LPARAM l_param);
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -295,8 +289,6 @@ private:
|
|||
extern LLW32MsgCallback gAsyncMsgCallback;
|
||||
extern LPWSTR gIconResource;
|
||||
|
||||
static void handleMessage( const MSG& msg );
|
||||
|
||||
S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 type);
|
||||
|
||||
#endif //LL_LLWINDOWWIN32_H
|
||||
|
|
|
|||
|
|
@ -1973,15 +1973,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
|||
U32 max_core_count = gSavedSettings.getU32("EmulateCoreCount");
|
||||
F32 max_gl_version = gSavedSettings.getF32("RenderMaxOpenGLVersion");
|
||||
|
||||
LLControlVariable* vram_control = gSavedSettings.getControl("RenderMaxVRAMBudget");
|
||||
U32 max_vram = vram_control->getValue().asInteger();
|
||||
mMaxVRAMControlConnection = vram_control->getSignal()->connect(
|
||||
[this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
|
||||
{
|
||||
if (mWindow) mWindow->setMaxVRAMMegabytes(new_val.asInteger());
|
||||
});
|
||||
|
||||
|
||||
mWindow = LLWindowManager::createWindow(this,
|
||||
p.title, p.name, p.x, p.y, p.width, p.height, 0,
|
||||
p.fullscreen,
|
||||
|
|
@ -1991,7 +1982,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
|||
p.ignore_pixel_depth,
|
||||
0,
|
||||
max_core_count,
|
||||
max_vram,
|
||||
max_gl_version, //don't use window level anti-aliasing
|
||||
useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
|
||||
|
|
@ -2721,8 +2711,6 @@ LLViewerWindow::~LLViewerWindow()
|
|||
LLViewerShaderMgr::releaseInstance();
|
||||
LLViewerShaderMgr::sInitialized = false;
|
||||
}
|
||||
|
||||
mMaxVRAMControlConnection.disconnect();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -556,8 +556,6 @@ private:
|
|||
// Object temporarily hovered over while dragging
|
||||
LLPointer<LLViewerObject> mDragHoveredObject;
|
||||
|
||||
boost::signals2::connection mMaxVRAMControlConnection;
|
||||
|
||||
static LLTrace::SampleStatHandle<> sMouseVelocityStat;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue