Merge remote-tracking branch 'upstream/exp'

This commit is contained in:
Latif Khalifa
2013-01-30 05:49:45 +01:00
11 changed files with 194 additions and 191 deletions

View File

@@ -779,8 +779,12 @@ void LLStat::init()
LLStat::stat_map_t& LLStat::getStatList()
{
static LLStat::stat_map_t stat_list;
return stat_list;
static LLStat::stat_map_t* stat_list = NULL;
if(!stat_list)
{
stat_list = new LLStat::stat_map_t();
}
return *stat_list;
}
LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer)

View File

@@ -1730,204 +1730,206 @@ void LLWindowSDL::gatherInput()
{
switch (event.type)
{
case SDL_MOUSEMOTION:
case SDL_MOUSEMOTION:
{
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
mCallbacks->handleMouseMove(this, openGlCoord, mask);
break;
}
case SDL_KEYDOWN:
mKeyScanCode = event.key.keysym.scancode;
mKeyVirtualKey = event.key.keysym.unicode;
mKeyModifiers = event.key.keysym.mod;
gKeyboard->handleKeyDown(event.key.keysym.sym, event.key.keysym.mod);
// part of the fix for SL-13243
if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0)
SDLReallyCaptureInput(TRUE);
if (event.key.keysym.unicode)
{
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
mCallbacks->handleMouseMove(this, openGlCoord, mask);
break;
handleUnicodeUTF16(event.key.keysym.unicode,
gKeyboard->currentMask(FALSE));
}
break;
case SDL_KEYDOWN:
mKeyScanCode = event.key.keysym.scancode;
mKeyVirtualKey = event.key.keysym.unicode;
mKeyModifiers = event.key.keysym.mod;
case SDL_KEYUP:
mKeyScanCode = event.key.keysym.scancode;
mKeyVirtualKey = event.key.keysym.unicode;
mKeyModifiers = event.key.keysym.mod;
gKeyboard->handleKeyDown(event.key.keysym.sym, event.key.keysym.mod);
// part of the fix for SL-13243
if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0)
SDLReallyCaptureInput(TRUE);
if (SDLCheckGrabbyKeys(event.key.keysym.sym, FALSE) == 0)
SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243
if (event.key.keysym.unicode)
{
handleUnicodeUTF16(event.key.keysym.unicode,
gKeyboard->currentMask(FALSE));
}
break;
gKeyboard->handleKeyUp(event.key.keysym.sym, event.key.keysym.mod);
break;
case SDL_KEYUP:
mKeyScanCode = event.key.keysym.scancode;
mKeyVirtualKey = event.key.keysym.unicode;
mKeyModifiers = event.key.keysym.mod;
case SDL_MOUSEBUTTONDOWN:
{
bool isDoubleClick = false;
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
if (SDLCheckGrabbyKeys(event.key.keysym.sym, FALSE) == 0)
SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243
gKeyboard->handleKeyUp(event.key.keysym.sym, event.key.keysym.mod);
break;
case SDL_MOUSEBUTTONDOWN:
if (event.button.button == SDL_BUTTON_LEFT) // SDL doesn't manage double clicking...
{
bool isDoubleClick = false;
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
if (event.button.button == SDL_BUTTON_LEFT) // SDL doesn't manage double clicking...
Uint32 now = SDL_GetTicks();
if ((now - lastLeftDown) > CLICK_THRESHOLD)
leftClick = 1;
else
{
Uint32 now = SDL_GetTicks();
if ((now - lastLeftDown) > CLICK_THRESHOLD)
leftClick = 1;
else
if (++leftClick >= 2)
{
if (++leftClick >= 2)
{
leftClick = 0;
isDoubleClick = true;
}
leftClick = 0;
isDoubleClick = true;
}
lastLeftDown = now;
}
else if (event.button.button == SDL_BUTTON_RIGHT)
lastLeftDown = now;
}
else if (event.button.button == SDL_BUTTON_RIGHT)
{
Uint32 now = SDL_GetTicks();
if ((now - lastRightDown) > CLICK_THRESHOLD)
rightClick = 1;
else
{
Uint32 now = SDL_GetTicks();
if ((now - lastRightDown) > CLICK_THRESHOLD)
rightClick = 1;
else
if (++rightClick >= 2)
{
if (++rightClick >= 2)
{
rightClick = 0;
isDoubleClick = true;
}
rightClick = 0;
isDoubleClick = true;
}
lastRightDown = now;
}
lastRightDown = now;
}
if (event.button.button == SDL_BUTTON_LEFT) // left
if (event.button.button == SDL_BUTTON_LEFT) // left
{
if (isDoubleClick)
mCallbacks->handleDoubleClick(this, openGlCoord, mask);
else
mCallbacks->handleMouseDown(this, openGlCoord, mask);
}
else if (event.button.button == SDL_BUTTON_RIGHT) // right
{
mCallbacks->handleRightMouseDown(this, openGlCoord, mask);
}
else if (event.button.button == SDL_BUTTON_MIDDLE) // middle
{
mCallbacks->handleMiddleMouseDown(this, openGlCoord, mask);
}
else if (event.button.button == 4) // mousewheel up...thanks to X11 for making SDL consider these "buttons".
mCallbacks->handleScrollWheel(this, -1);
else if (event.button.button == 5) // mousewheel down...thanks to X11 for making SDL consider these "buttons".
mCallbacks->handleScrollWheel(this, 1);
break;
}
case SDL_MOUSEBUTTONUP:
{
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
if (event.button.button == SDL_BUTTON_LEFT) // left
mCallbacks->handleMouseUp(this, openGlCoord, mask);
else if (event.button.button == SDL_BUTTON_RIGHT) // right
mCallbacks->handleRightMouseUp(this, openGlCoord, mask);
else if (event.button.button == SDL_BUTTON_MIDDLE) // middle
mCallbacks->handleMiddleMouseUp(this, openGlCoord, mask);
// don't handle mousewheel here...
break;
}
case SDL_VIDEOEXPOSE: // VIDEOEXPOSE doesn't specify the damage, but hey, it's OpenGL...repaint the whole thing!
mCallbacks->handlePaint(this, 0, 0, mWindow->w, mWindow->h);
break;
case SDL_VIDEORESIZE:
{
llinfos << "Handling a resize event: " << event.resize.w <<
"x" << event.resize.h << llendl;
S32 width = llmax(event.resize.w, MIN_WINDOW_WIDTH);
S32 height = llmax(event.resize.h, MIN_WINDOW_HEIGHT);
if (width != mWindow->w || height != mWindow->h)
{
mWindow = SDL_SetVideoMode(width, height, 32, mSDLFlags);
}
if (!mWindow)
{
// *FIX: More informative dialog?
llinfos << "Could not recreate context after resize! Quitting..." << llendl;
if(mCallbacks->handleCloseRequest(this))
{
if (isDoubleClick)
mCallbacks->handleDoubleClick(this, openGlCoord, mask);
// Get the app to initiate cleanup.
mCallbacks->handleQuit(this);
// The app is responsible for calling destroyWindow when done with GL
}
break;
}
mCallbacks->handleResize(this, width, height);
break;
}
case SDL_ACTIVEEVENT:
if (event.active.state & SDL_APPINPUTFOCUS)
{
// Note that for SDL (particularly on X11), keyboard
// and mouse focus are independent things. Here we are
// tracking keyboard focus state changes.
// We have to do our own state massaging because SDL
// can send us two unfocus events in a row for example,
// which confuses the focus code [SL-24071].
if (event.active.gain != mHaveInputFocus)
{
mHaveInputFocus = !!event.active.gain;
if (mHaveInputFocus)
mCallbacks->handleFocus(this);
else
mCallbacks->handleMouseDown(this, openGlCoord, mask);
mCallbacks->handleFocusLost(this);
}
else if (event.button.button == SDL_BUTTON_RIGHT) // right
{
mCallbacks->handleRightMouseDown(this, openGlCoord, mask);
}
else if (event.button.button == SDL_BUTTON_MIDDLE) // middle
{
mCallbacks->handleMiddleMouseDown(this, openGlCoord, mask);
}
else if (event.button.button == 4) // mousewheel up...thanks to X11 for making SDL consider these "buttons".
mCallbacks->handleScrollWheel(this, -1);
else if (event.button.button == 5) // mousewheel down...thanks to X11 for making SDL consider these "buttons".
mCallbacks->handleScrollWheel(this, 1);
break;
}
case SDL_MOUSEBUTTONUP:
if (event.active.state & SDL_APPACTIVE)
{
LLCoordWindow winCoord(event.button.x, event.button.y);
LLCoordGL openGlCoord;
convertCoords(winCoord, &openGlCoord);
MASK mask = gKeyboard->currentMask(TRUE);
// Change in iconification/minimization state.
if ((!event.active.gain) != mIsMinimized)
{
mIsMinimized = (!event.active.gain);
if (event.button.button == SDL_BUTTON_LEFT) // left
mCallbacks->handleMouseUp(this, openGlCoord, mask);
else if (event.button.button == SDL_BUTTON_RIGHT) // right
mCallbacks->handleRightMouseUp(this, openGlCoord, mask);
else if (event.button.button == SDL_BUTTON_MIDDLE) // middle
mCallbacks->handleMiddleMouseUp(this, openGlCoord, mask);
// don't handle mousewheel here...
break;
mCallbacks->handleActivate(this, !mIsMinimized);
lldebugs << "SDL deiconification state switched to " << BOOL(event.active.gain) << llendl;
}
else
{
llinfos << "Ignored bogus redundant SDL deiconification state switch to " << BOOL(event.active.gain) << llendl;
}
}
break;
case SDL_VIDEOEXPOSE: // VIDEOEXPOSE doesn't specify the damage, but hey, it's OpenGL...repaint the whole thing!
mCallbacks->handlePaint(this, 0, 0, mWindow->w, mWindow->h);
break;
case SDL_VIDEORESIZE: // *FIX: handle this?
case SDL_QUIT:
if(mCallbacks->handleCloseRequest(this))
{
llinfos << "Handling a resize event: " << event.resize.w <<
"x" << event.resize.h << llendl;
S32 width = llmax(event.resize.w, MIN_WINDOW_WIDTH);
S32 height = llmax(event.resize.h, MIN_WINDOW_HEIGHT);
// *FIX: I'm not sure this is necessary!
mWindow = SDL_SetVideoMode(width, height, 32, mSDLFlags);
if (!mWindow)
{
// *FIX: More informative dialog?
llinfos << "Could not recreate context after resize! Quitting..." << llendl;
if(mCallbacks->handleCloseRequest(this))
{
// Get the app to initiate cleanup.
mCallbacks->handleQuit(this);
// The app is responsible for calling destroyWindow when done with GL
}
break;
}
mCallbacks->handleResize(this, width, height);
break;
// Get the app to initiate cleanup.
mCallbacks->handleQuit(this);
// The app is responsible for calling destroyWindow when done with GL
}
case SDL_ACTIVEEVENT:
if (event.active.state & SDL_APPINPUTFOCUS)
{
// Note that for SDL (particularly on X11), keyboard
// and mouse focus are independent things. Here we are
// tracking keyboard focus state changes.
// We have to do our own state massaging because SDL
// can send us two unfocus events in a row for example,
// which confuses the focus code [SL-24071].
if (event.active.gain != mHaveInputFocus)
{
mHaveInputFocus = !!event.active.gain;
if (mHaveInputFocus)
mCallbacks->handleFocus(this);
else
mCallbacks->handleFocusLost(this);
}
}
if (event.active.state & SDL_APPACTIVE)
{
// Change in iconification/minimization state.
if ((!event.active.gain) != mIsMinimized)
{
mIsMinimized = (!event.active.gain);
mCallbacks->handleActivate(this, !mIsMinimized);
lldebugs << "SDL deiconification state switched to " << BOOL(event.active.gain) << llendl;
}
else
{
llinfos << "Ignored bogus redundant SDL deiconification state switch to " << BOOL(event.active.gain) << llendl;
}
}
break;
case SDL_QUIT:
if(mCallbacks->handleCloseRequest(this))
{
// Get the app to initiate cleanup.
mCallbacks->handleQuit(this);
// The app is responsible for calling destroyWindow when done with GL
}
break;
default:
//llinfos << "Unhandled SDL event type " << event.type << llendl;
break;
break;
default:
//llinfos << "Unhandled SDL event type " << event.type << llendl;
break;
}
}

View File

@@ -1173,7 +1173,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes()
return FALSE;
}
if (width > 512 || height > 512)
if (width > 1024 || height > 1024)
{
LLSD args;

View File

@@ -1826,7 +1826,7 @@ std::string LLViewerRegion::getCapability(const std::string& name) const
{
if (!capabilitiesReceived() && (name!=std::string("Seed")) && (name!=std::string("ObjectMedia")))
{
llwarns << "getCapability called before caps received" << llendl;
llwarns << "getCapability("<<name<<") called before caps received" << llendl;
}
CapabilityMap::const_iterator iter = mImpl->mCapabilities.find(name);

View File

@@ -1579,7 +1579,7 @@ void LLVoiceClient::stateMachine()
LLViewerRegion *region = gAgent.getRegion();
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if(region && parcel)
if(region && parcel && region->capabilitiesReceived())
{
S32 parcelLocalID = parcel->getLocalID();
std::string regionName = region->getName();
@@ -1876,7 +1876,7 @@ void LLVoiceClient::stateMachine()
{
LLViewerRegion *region = gAgent.getRegion();
if(region)
if(region && region->capabilitiesReceived())
{
if ( region->getCapability("ProvisionVoiceAccountRequest") != "" )
{

View File

@@ -2831,9 +2831,9 @@ Are you sure you want to return objects owned by [USER_NAME]?
name="InvalidTerrainBitDepth"
type="alertmodal">
Couldn&apos;t set region textures:
Terrain texture [TEXTURE_NUM] has an invalid bit depth of [TEXTURE_BIT_DEPTH].
Terrain texture [TEXTURE_NUM] has an invalid bit depth of [TEXTURE_BIT_DEPTH]. Probable cause is that the texture data contains transparency information.
Replace texture [TEXTURE_NUM] with a 24-bit 512x512 or smaller image then click &quot;Apply&quot; again.
Replace texture [TEXTURE_NUM] with a 24-bit 1024x1024 or smaller image then click &quot;Apply&quot; again.
</notification>
<notification
@@ -2843,7 +2843,7 @@ Replace texture [TEXTURE_NUM] with a 24-bit 512x512 or smaller image then click
Couldn&apos;t set region textures:
Terrain texture [TEXTURE_NUM] is too large at [TEXTURE_SIZE_X]x[TEXTURE_SIZE_Y].
Replace texture [TEXTURE_NUM] with a 24-bit 512x512 or smaller image then click &quot;Apply&quot; again.
Replace texture [TEXTURE_NUM] with a 24-bit 1024x1024 or smaller image then click &quot;Apply&quot; again.
</notification>
<notification

View File

@@ -11,7 +11,7 @@
</text>
<text bottom_delta="-26" follows="left|top" height="20" left="10"
name="detail_texture_text" width="300">
Terrain Textures (requires 512x512, 24 bit .tga files)
Terrain Textures
</text>
<texture_picker bottom_delta="-100" follows="left|top" height="100" left="10"
name="texture_detail_0" width="100" />

View File

@@ -1624,14 +1624,14 @@ Por favor, selecciona sólo uno y reinténtalo.
No se han podido configurar las texturas de la región:
La textura del terreno [TEXTURE_NUM] tiene una profundidad de bites inválida: [TEXTURE_BIT_DEPTH].
Cambia la textura [TEXTURE_NUM] por una imagen de 24-bit y 512x512 o menor, y pulsa de nuevo &apos;Aplicar&apos; .
Cambia la textura [TEXTURE_NUM] por una imagen de 24-bit y 1024x1024 o menor, y pulsa de nuevo &apos;Aplicar&apos; .
</notification>
<notification name="InvalidTerrainSize">
No se han podido configurar las texturas de la región:
La textura del terreno [TEXTURE_NUM] es demasiado grande: [TEXTURE_SIZE_X]x[TEXTURE_SIZE_Y].
Cambia la textura [TEXTURE_NUM] por una imagen de 24-bit y 512x512 o menor, y pulsa de nuevo &apos;Aplicar&apos; .
Cambia la textura [TEXTURE_NUM] por una imagen de 24-bit y 1024x1024 o menor, y pulsa de nuevo &apos;Aplicar&apos; .
</notification>
<notification name="RawUploadStarted">

View File

@@ -7,7 +7,7 @@
desconocida
</text>
<text name="detail_texture_text">
Texturas del Terreno (requiere archivos tga de 512x512, 24 bit)
Texturas del Terreno
</text>
<text name="height_text_lbl">
1 (baja)

View File

@@ -1220,13 +1220,13 @@ Veuillez ne sélectionner qu&apos;un seul objet.
Impossible de definir les textures de la région :
La texture du terrain [TEXTURE_NUM] a une profondeur invalide ([TEXTURE_BIT_DEPTH]).
Remplacer la texture [TEXTURE_NUM] avec une image de 24 bits, 512 X 512, ou plus petite, puis cliquez à nouveau sur Appliquer.
Remplacer la texture [TEXTURE_NUM] avec une image de 24 bits, 1024x1024, ou plus petite, puis cliquez à nouveau sur Appliquer.
</notification>
<notification name="InvalidTerrainSize">
Impossible de definir les textures de la région :
La texture du terrain [TEXTURE_NUM] est trop volumineuse ([TEXTURE_SIZE_X] X [TEXTURE_SIZE_Y]).
Remplacer la texture [TEXTURE_NUM] avec une image de 24 bits, 512 X 512, ou plus petite, puis cliquez à nouveau sur Appliquer.
Remplacer la texture [TEXTURE_NUM] avec une image de 24 bits, 1024x1024, ou plus petite, puis cliquez à nouveau sur Appliquer.
</notification>
<notification name="RawUploadStarted">
Le chargement a commencé. Cela va prendre une à deux minutes,
@@ -3261,4 +3261,4 @@ Si vous avez toujours des problèmes, veuillez consulter la page suivante : ht
</notification>
</notifications>
</notifications>

View File

@@ -6,9 +6,6 @@
<text name="region_text">
(inconnue)
</text>
<text name="base_texture_text">
Textures de base (fichiers 128x128, 24 bits .tga)
</text>
<text name="height_text_lbl">
1 (faible)
</text>
@@ -22,7 +19,7 @@
4 (élevé)
</text>
<text name="detail_texture_text">
Textures du terrain (fichiers.tga 512 x 512, 24 bits requis)
Textures du terrain
</text>
<text name="height_text_lbl5">
Limites d&apos;élévation de texture