summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llwindow/llwindow.cpp26
-rw-r--r--indra/llwindow/llwindowsdl.h2
-rw-r--r--indra/newview/llagent.cpp7
-rw-r--r--indra/newview/llagent.h3
-rw-r--r--indra/newview/llappviewerlinux.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp2
-rw-r--r--indra/newview/rlvdefines.h1
-rw-r--r--indra/newview/rlvhandler.cpp11
-rw-r--r--indra/newview/rlvhelper.cpp1
9 files changed, 38 insertions, 17 deletions
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 4f3cc69c75..bff559591f 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -74,12 +74,12 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type)
LL_WARNS() << "OSMessageBox: " << text << LL_ENDL;
#if LL_MESA_HEADLESS // !!! *FIX: (?)
return OSBTN_OK;
+#elif LL_SDL
+ result = OSMessageBoxSDL(text, caption, type);
#elif LL_WINDOWS
result = OSMessageBoxWin32(text, caption, type);
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
result = OSMessageBoxMacOSX(text, caption, type);
-#elif LL_SDL
- result = OSMessageBoxSDL(text, caption, type);
#else
#error("OSMessageBox not implemented for this platform!")
#endif
@@ -259,12 +259,12 @@ bool LLWindow::copyTextToPrimary(const LLWString &src)
// static
std::vector<std::string> LLWindow::getDynamicFallbackFontList()
{
-#if LL_WINDOWS
+#if LL_SDL
+ return LLWindowSDL::getDynamicFallbackFontList();
+#elif LL_WINDOWS
return LLWindowWin32::getDynamicFallbackFontList();
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
return LLWindowMacOSX::getDynamicFallbackFontList();
-#elif LL_SDL
- return LLWindowSDL::getDynamicFallbackFontList();
#else
return std::vector<std::string>();
#endif
@@ -273,12 +273,12 @@ std::vector<std::string> LLWindow::getDynamicFallbackFontList()
// static
std::vector<std::string> LLWindow::getDisplaysResolutionList()
{
-#if LL_WINDOWS
+#if LL_SDL
+ return std::vector<std::string>();
+#elif LL_WINDOWS
return LLWindowWin32::getDisplaysResolutionList();
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
return LLWindowMacOSX::getDisplaysResolutionList();
-#else
- return std::vector<std::string>();
#endif
}
@@ -346,7 +346,7 @@ LLSplashScreen *LLSplashScreen::create()
return 0;
#elif LL_WINDOWS
return new LLSplashScreenWin32;
-#elif LL_DARWIN && !LL_SDL
+#elif LL_DARWIN
return new LLSplashScreenMacOSX;
#else
#error("LLSplashScreen not implemented on this platform!")
@@ -359,7 +359,7 @@ void LLSplashScreen::show()
{
if (!gSplashScreenp)
{
-#if LL_WINDOWS && !LL_MESA_HEADLESS
+#if LL_WINDOWS && !LL_MESA_HEADLESS && !LL_SDL
gSplashScreenp = new LLSplashScreenWin32;
#elif LL_DARWIN && !LL_SDL
gSplashScreenp = new LLSplashScreenMacOSX;
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 144216f658..076d7234bc 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -32,7 +32,7 @@
#include "llwindow.h"
#include "lltimer.h"
-#if !defined(__i386__) && !defined(__x86_64__)
+#if !defined(__i386__) && !defined(__x86_64__) && !_M_X64
#define SDL_DISABLE_IMMINTRIN_H
#endif
#include "SDL2/SDL.h"
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3a4e29afc1..f7b48d25f2 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -388,6 +388,7 @@ LLAgent::LLAgent() :
mAllowedToStand(true),
mAllowedToSit(true),
+ mSitObjectID(LLUUID::null),
mAgentAccess(new LLAgentAccess(gSavedSettings)),
mGodLevelChangeSignal(),
@@ -972,7 +973,11 @@ bool LLAgent::isSitting()
void LLAgent::standUp()
{
- if (mAllowedToStand) setControlFlags(AGENT_CONTROL_STAND_UP);
+ if (mAllowedToStand)
+ {
+ setControlFlags(AGENT_CONTROL_STAND_UP);
+ mSitObjectID = LLUUID::null;
+ }
}
void LLAgent::changeParcels()
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index ca8aaaee86..b475782946 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -450,9 +450,12 @@ public:
void setAllowedToStand(bool allow) { mAllowedToStand = allow; }
bool isAllowedToSit() const { return mAllowedToSit; }
void setAllowedToSit(bool allow) { mAllowedToSit = allow; }
+ const LLUUID& getSitObjectID() const { return mSitObjectID; }
+ void setSitObjectID(const LLUUID& objectID) { mSitObjectID = objectID; }
private:
bool mAllowedToStand;
bool mAllowedToSit;
+ LLUUID mSitObjectID;
//--------------------------------------------------------------------
// Do Not Disturb
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index c1e8f38c51..9135921acc 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -126,7 +126,7 @@ int main( int argc, char **argv )
// install unexpected exception handler
gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
- unsetenv( "LD_PRELOAD" ); // <FS:ND/> Get rid of any preloading, we do not want this to happen during startup of plugins.
+ //unsetenv( "LD_PRELOAD" ); // <FS:ND/> Get rid of any preloading, we do not want this to happen during startup of plugins.
bool ok = viewer_app_ptr->init();
if(!ok)
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index b35be7d385..47d7d42bf7 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4212,6 +4212,8 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
{
LL_WARNS("Messaging") << "Received sit approval for unknown object " << sitObjectID << LL_ENDL;
}
+
+ gAgent.setSitObjectID(sitObjectID);
}
void process_clear_follow_cam_properties(LLMessageSystem *mesgsys, void **user_data)
diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h
index 50e0c95f7b..132aae9b2c 100644
--- a/indra/newview/rlvdefines.h
+++ b/indra/newview/rlvdefines.h
@@ -93,6 +93,7 @@ namespace Rlv
Version = 0,
VersionNew,
VersionNum,
+ GetSitID,
Sit,
SitGround,
Unsit,
diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp
index dce1471100..122a87ec43 100644
--- a/indra/newview/rlvhandler.cpp
+++ b/indra/newview/rlvhandler.cpp
@@ -227,6 +227,16 @@ ECmdRet ReplyHandler<EBehaviour::VersionNum>::onCommand(const RlvCommand& rlvCmd
return ECmdRet::Succeeded;
}
+template<> template<>
+ECmdRet ReplyHandler<EBehaviour::GetSitID>::onCommand(const RlvCommand& rlvCmd, std::string& strReply)
+{
+ if (gAgent.isSitting())
+ gAgent.getSitObjectID().toString(strReply);
+ else
+ strReply = "00000000-0000-0000-0000-000000000000";
+ return ECmdRet::Succeeded;
+}
+
// Force
ECmdRet CommandHandlerBaseImpl<EParamType::Force>::processCommand(const RlvCommand& rlvCmd, ForceHandlerFunc* pHandler)
@@ -284,5 +294,4 @@ ECmdRet BehaviourToggleHandler<EBehaviour::Unsit>::onCommand(const RlvCommand& r
return ECmdRet::Succeeded;
}
-template<> template<>
// ============================================================================
diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp
index f26b5a115f..ccb4675cbb 100644
--- a/indra/newview/rlvhelper.cpp
+++ b/indra/newview/rlvhelper.cpp
@@ -50,6 +50,7 @@ BehaviourDictionary::BehaviourDictionary()
// Reply-only
//
addEntry(new ReplyProcessor<EBehaviour::GetCommand>("getcommand"));
+ addEntry(new ReplyProcessor<EBehaviour::GetSitID>("getsitid"));
addEntry(new ReplyProcessor<EBehaviour::Version, VersionReplyHandler>("version"));
addEntry(new ReplyProcessor<EBehaviour::VersionNew, VersionReplyHandler>("versionnew"));
addEntry(new ReplyProcessor<EBehaviour::VersionNum>("versionnum"));