diff options
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 241 |
1 files changed, 115 insertions, 126 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index eb689dc48c..8c90f917b8 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -57,7 +57,7 @@ extern "C" { # include <stdio.h> #endif // LL_LINUX -extern BOOL gDebugWindowProc; +extern bool gDebugWindowProc; const S32 MAX_NUM_RESOLUTIONS = 200; @@ -70,7 +70,7 @@ static bool ATIbug = false; #include <CoreGraphics/CGDirectDisplay.h> #include <CoreServices/CoreServices.h> -BOOL gHiDPISupport = TRUE; +bool gHiDPISupport = true; namespace { @@ -95,11 +95,11 @@ namespace // LLWindowMacOSX // -BOOL LLWindowSDL::sUseMultGL = FALSE; +bool LLWindowSDL::sUseMultGL = false; #endif -BOOL hasHIDPI = 0; +bool hasHIDPI = 0; // // LLWindowSDL @@ -397,9 +397,9 @@ Display* LLWindowSDL::getSDLDisplay() LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, const std::string& title, S32 x, S32 y, S32 width, S32 height, U32 flags, - BOOL fullscreen, BOOL clearBg, - BOOL disable_vsync, BOOL use_gl, - BOOL ignore_pixel_depth, U32 fsaa_samples) + bool fullscreen, bool clearBg, + bool disable_vsync, bool use_gl, + bool ignore_pixel_depth, U32 fsaa_samples) : LLWindow(callbacks, fullscreen, flags), Lock_Display(NULL), //Unlock_Display(NULL), mGamma(1.0f) @@ -417,7 +417,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, // Ignore use_gl for now, only used for drones on PC mWindow = NULL; mContext = {}; - mNeedsResize = FALSE; + mNeedsResize = false; mOverrideAspectRatio = 0.f; mGrabbyKeyFlags = 0; mReallyCapturedCount = 0; @@ -454,7 +454,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, gWindowImplementation = this; #if LL_X11 - mFlashing = FALSE; + mFlashing = false; initialiseX11Clipboard(); #endif // LL_X11 @@ -675,7 +675,7 @@ void LLWindowSDL::tryFindFullscreenSize( int &width, int &height ) } } -BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync) +bool LLWindowSDL::createContext(int x, int y, int width, int height, int bits, bool fullscreen, bool disable_vsync) { //bool glneedsinit = false; @@ -794,7 +794,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B { LL_WARNS() << "Cannot create GL context " << SDL_GetError() << LL_ENDL; setupFailure("GL Context creation error creation error", "Error", OSMB_OK); - return FALSE; + return false; } // SDL_GL_SetSwapInterval(1); } @@ -804,7 +804,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B { if (mWindow) { - mFullscreen = TRUE; + mFullscreen = true; /* mFullscreenWidth = mSurface->w; mFullscreenHeight = mSurface->h; @@ -823,7 +823,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B { LL_WARNS() << "createContext: fullscreen creation failure. SDL: " << SDL_GetError() << LL_ENDL; // No fullscreen support - mFullscreen = FALSE; + mFullscreen = false; mFullscreenWidth = -1; mFullscreenHeight = -1; mFullscreenBits = -1; @@ -831,7 +831,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B std::string error = llformat("Unable to run fullscreen at %d x %d.\nRunning in window.", width, height); OSMessageBox(error, "Error", OSMB_OK); - return FALSE; + return false; } } else @@ -840,7 +840,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B { LL_WARNS() << "createContext: window creation failure. SDL: " << SDL_GetError() << LL_ENDL; setupFailure("Window creation error", "Error", OSMB_OK); - return FALSE; + return false; } } @@ -939,7 +939,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B "will automatically adjust the screen each time it runs.", "Error", OSMB_OK); - return FALSE; + return false; #endif } @@ -976,15 +976,15 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B #endif // Don't need to get the current gamma, since there's a call that restores it to the system defaults. - return TRUE; + return true; } // changing fullscreen resolution, or switching between windowed and fullscreen mode. -BOOL LLWindowSDL::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp) +bool LLWindowSDL::switchContext(bool fullscreen, const LLCoordScreen &size, bool disable_vsync, const LLCoordScreen * const posp) { - const BOOL needsRebuild = TRUE; // Just nuke the context and start over. - BOOL result = true; + const bool needsRebuild = true; // Just nuke the context and start over. + bool result = true; LL_INFOS() << "switchContext, fullscreen=" << fullscreen << LL_ENDL; stop_glerror(); @@ -1092,86 +1092,86 @@ void LLWindowSDL::close() // } // Make sure cursor is visible and we haven't mangled the clipping state. - setMouseClipping(FALSE); + setMouseClipping(false); showCursor(); destroyContext(); } -BOOL LLWindowSDL::isValid() +bool LLWindowSDL::isValid() { return (mWindow != NULL); } -BOOL LLWindowSDL::getVisible() +bool LLWindowSDL::getVisible() { - BOOL result = FALSE; + bool result = false; // *FIX: This isn't really right... // Then what is? if (mWindow) { - if( SDL_GetWindowFlags(mWindow) & SDL_WINDOW_SHOWN ) result = TRUE; + if( SDL_GetWindowFlags(mWindow) & SDL_WINDOW_SHOWN ) result = true; } return(result); } -BOOL LLWindowSDL::getMinimized() +bool LLWindowSDL::getMinimized() { - BOOL result = FALSE; + bool result = false; if (mWindow/*&& (1 == mIsMinimized)*/) { - if( SDL_GetWindowFlags(mWindow) & SDL_WINDOW_MINIMIZED ) result = TRUE; + if( SDL_GetWindowFlags(mWindow) & SDL_WINDOW_MINIMIZED ) result = true; } mIsMinimized = result; return(result); } -BOOL LLWindowSDL::getMaximized() +bool LLWindowSDL::getMaximized() { - BOOL result = FALSE; + bool result = false; if (mWindow) { // TODO - if( SDL_GetWindowFlags(mWindow) & SDL_WINDOW_MAXIMIZED ) result = TRUE; - else result = FALSE; + if( SDL_GetWindowFlags(mWindow) & SDL_WINDOW_MAXIMIZED ) result = true; + else result = false; } return(result); } -BOOL LLWindowSDL::maximize() +bool LLWindowSDL::maximize() { // TODO - BOOL result = FALSE; + bool result = false; if (mWindow) { SDL_MaximizeWindow(mWindow); - result = TRUE; + result = true; } return result; } -BOOL LLWindowSDL::getFullscreen() +bool LLWindowSDL::getFullscreen() { return mFullscreen; } -BOOL LLWindowSDL::getPosition(LLCoordScreen *position) +bool LLWindowSDL::getPosition(LLCoordScreen *position) { // *FIX: can anything be done with this? position->mX = 0; position->mY = 0; - return TRUE; + return true; } -BOOL LLWindowSDL::getSize(LLCoordScreen *size) +bool LLWindowSDL::getSize(LLCoordScreen *size) { if (mWindow) { @@ -1181,13 +1181,13 @@ BOOL LLWindowSDL::getSize(LLCoordScreen *size) else */ SDL_GetWindowSize(mWindow, &size->mX, &size->mY); - return (TRUE); + return (true); } - return (FALSE); + return (false); } -BOOL LLWindowSDL::getSize(LLCoordWindow *size) +bool LLWindowSDL::getSize(LLCoordWindow *size) { if (mWindow) { @@ -1195,22 +1195,22 @@ BOOL LLWindowSDL::getSize(LLCoordWindow *size) SDL_GL_GetDrawableSize(mWindow, &size->mX, &size->mY); else SDL_GetWindowSize(mWindow, &size->mX, &size->mY); - return (TRUE); + return (true); } - return (FALSE); + return (false); } -BOOL LLWindowSDL::setPosition(const LLCoordScreen position) +bool LLWindowSDL::setPosition(const LLCoordScreen position) { - BOOL result = FALSE; + bool result = false; if(mWindow) { // *FIX: (?) //MacMoveWindow(mWindow, position.mX, position.mY, false); SDL_SetWindowPosition(mWindow, position.mX, position.mY); - result = TRUE; + result = true; } return result; @@ -1239,12 +1239,12 @@ template< typename T > bool setSizeImpl( const T& newSize, SDL_Window *pWin ) return true; } -BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size) +bool LLWindowSDL::setSizeImpl(const LLCoordScreen size) { return ::setSizeImpl( size, mWindow ); } -BOOL LLWindowSDL::setSizeImpl(const LLCoordWindow size) +bool LLWindowSDL::setSizeImpl(const LLCoordWindow size) { return ::setSizeImpl( size, mWindow ); } @@ -1273,7 +1273,7 @@ F32 LLWindowSDL::getGamma() return 1/mGamma; } -BOOL LLWindowSDL::restoreGamma() +bool LLWindowSDL::restoreGamma() { //CGDisplayRestoreColorSyncSettings(); // SDL_SetGamma(1.0f, 1.0f, 1.0f); @@ -1283,7 +1283,7 @@ BOOL LLWindowSDL::restoreGamma() return true; } -BOOL LLWindowSDL::setGamma(const F32 gamma) +bool LLWindowSDL::setGamma(const F32 gamma) { mGamma = gamma; if (mGamma == 0) mGamma = 0.1f; @@ -1295,7 +1295,7 @@ BOOL LLWindowSDL::setGamma(const F32 gamma) return true; } -BOOL LLWindowSDL::isCursorHidden() +bool LLWindowSDL::isCursorHidden() { return mCursorHidden; } @@ -1303,7 +1303,7 @@ BOOL LLWindowSDL::isCursorHidden() // Constrains the mouse to the window. -void LLWindowSDL::setMouseClipping( BOOL b ) +void LLWindowSDL::setMouseClipping( bool b ) { //SDL_WM_GrabInput(b ? SDL_GRAB_ON : SDL_GRAB_OFF); } @@ -1327,14 +1327,14 @@ void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immedia #endif } -BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position) +bool LLWindowSDL::setCursorPosition(const LLCoordWindow position) { - BOOL result = TRUE; + bool result = true; LLCoordScreen screen_pos; if (!convertCoords(position, &screen_pos)) { - return FALSE; + return false; } //LL_INFOS() << "setCursorPosition(" << screen_pos.mX << ", " << screen_pos.mY << ")" << LL_ENDL; @@ -1354,7 +1354,7 @@ BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position) return result; } -BOOL LLWindowSDL::getCursorPosition(LLCoordWindow *position) +bool LLWindowSDL::getCursorPosition(LLCoordWindow *position) { //Point cursor_point; LLCoordScreen screen_pos; @@ -1429,7 +1429,7 @@ void LLWindowSDL::beforeDialog() LL_INFOS() << "LLWindowSDL::beforeDialog()" << LL_ENDL; - if (SDLReallyCaptureInput(FALSE)) // must ungrab input so popup works! + if (SDLReallyCaptureInput(false)) // must ungrab input so popup works! { if (mFullscreen) { @@ -1482,7 +1482,7 @@ void LLWindowSDL::afterDialog() #if LL_X11 // set/reset the XWMHints flag for 'urgency' that usually makes the icon flash -void LLWindowSDL::x11_set_urgent(BOOL urgent) +void LLWindowSDL::x11_set_urgent(bool urgent) { if (mSDL_Display && !mFullscreen) { @@ -1523,13 +1523,13 @@ void LLWindowSDL::flashIcon(F32 seconds) mFlashTimer.reset(); mFlashTimer.setTimerExpirySec(remaining_time); - x11_set_urgent(TRUE); - mFlashing = TRUE; + x11_set_urgent(true); + mFlashing = true; #endif // LL_X11 } } -BOOL LLWindowSDL::isClipboardTextAvailable() +bool LLWindowSDL::isClipboardTextAvailable() { #if LL_X11 return mSDL_Display && XGetSelectionOwner(mSDL_Display, XA_CLIPBOARD) != None; @@ -1538,7 +1538,7 @@ BOOL LLWindowSDL::isClipboardTextAvailable() #endif } -BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst) +bool LLWindowSDL::pasteTextFromClipboard(LLWString &dst) { #if LL_X11 return getSelectionText(XA_CLIPBOARD, dst); @@ -1548,13 +1548,13 @@ BOOL LLWindowSDL::pasteTextFromClipboard(LLWString &dst) { dst = LLWString(utf8str_to_wstring(data)); SDL_free(data); - return TRUE; + return true; } - return FALSE; + return false; #endif } -BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s) +bool LLWindowSDL::copyTextToClipboard(const LLWString &s) { #if LL_X11 return setSelectionText(XA_CLIPBOARD, s); @@ -1563,31 +1563,31 @@ BOOL LLWindowSDL::copyTextToClipboard(const LLWString &s) #endif } -BOOL LLWindowSDL::isPrimaryTextAvailable() +bool LLWindowSDL::isPrimaryTextAvailable() { #if LL_X11 LLWString text; return getSelectionText(XA_PRIMARY, text) && !text.empty(); #else - return FALSE; // unsupported + return false; // unsupported #endif } -BOOL LLWindowSDL::pasteTextFromPrimary(LLWString &dst) +bool LLWindowSDL::pasteTextFromPrimary(LLWString &dst) { #if LL_X11 return getSelectionText(XA_PRIMARY, dst); #else - return FALSE; // unsupported + return false; // unsupported #endif } -BOOL LLWindowSDL::copyTextToPrimary(const LLWString &s) +bool LLWindowSDL::copyTextToPrimary(const LLWString &s) { #if LL_X11 return setSelectionText(XA_PRIMARY, s); #else - return FALSE; // unsupported + return false; // unsupported #endif } @@ -1631,62 +1631,62 @@ LLWindow::LLWindowResolution* LLWindowSDL::getSupportedResolutions(S32 &num_reso return mSupportedResolutions; } -BOOL LLWindowSDL::convertCoords(LLCoordGL from, LLCoordWindow *to) +bool LLWindowSDL::convertCoords(LLCoordGL from, LLCoordWindow *to) { if (!to) - return FALSE; + return false; to->mX = from.mX; int h; SDL_GetWindowSize(mWindow, nullptr, &h); to->mY = h - from.mY - 1; - return TRUE; + return true; } -BOOL LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordGL* to) +bool LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordGL* to) { if (!to) - return FALSE; + return false; to->mX = from.mX; int h; SDL_GetWindowSize(mWindow, nullptr, &h); to->mY = h - from.mY - 1; - return TRUE; + return true; } -BOOL LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordWindow* to) +bool LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordWindow* to) { if (!to) - return FALSE; + return false; // In the fullscreen case, window and screen coordinates are the same. to->mX = from.mX; to->mY = from.mY; - return (TRUE); + return (true); } -BOOL LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordScreen *to) +bool LLWindowSDL::convertCoords(LLCoordWindow from, LLCoordScreen *to) { if (!to) - return FALSE; + return false; // In the fullscreen case, window and screen coordinates are the same. to->mX = from.mX; to->mY = from.mY; - return (TRUE); + return (true); } -BOOL LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordGL *to) +bool LLWindowSDL::convertCoords(LLCoordScreen from, LLCoordGL *to) { LLCoordWindow window_coord; return(convertCoords(from, &window_coord) && convertCoords(window_coord, to)); } -BOOL LLWindowSDL::convertCoords(LLCoordGL from, LLCoordScreen *to) +bool LLWindowSDL::convertCoords(LLCoordGL from, LLCoordScreen *to) { LLCoordWindow window_coord; @@ -1703,7 +1703,7 @@ void LLWindowSDL::setupFailure(const std::string& text, const std::string& capti OSMessageBox(text, caption, type); } -BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture) +bool LLWindowSDL::SDLReallyCaptureInput(bool capture) { // note: this used to be safe to call nestedly, but in the // end that's not really a wise usage pattern, so don't. @@ -1775,7 +1775,7 @@ BOOL LLWindowSDL::SDLReallyCaptureInput(BOOL capture) return capture == newGrab; } -U32 LLWindowSDL::SDLCheckGrabbyKeys(U32 keysym, BOOL gain) +U32 LLWindowSDL::SDLCheckGrabbyKeys(U32 keysym, bool gain) { /* part of the fix for SL-13243: Some popular window managers like to totally eat alt-drag for the purposes of moving windows. We @@ -1923,7 +1923,7 @@ void LLWindowSDL::processMiscNativeEvents() pump_timer.setTimerExpirySec(1.0f / 15.0f); do { - g_main_context_iteration(g_main_context_default(), FALSE); + g_main_context_iteration(g_main_context_default(), false); } while( g_main_context_pending(g_main_context_default()) && !pump_timer.hasExpired()); #endif @@ -1964,7 +1964,7 @@ void LLWindowSDL::gatherInput() //LL_INFOS() << "SDL_MOUSEMOTION " << event.button.x << " " << event.button.y << " gl " << openGlCoord.mX << " " << openGlCoord.mY << LL_ENDL; - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); mCallbacks->handleMouseMove(this, openGlCoord, mask); break; } @@ -1972,7 +1972,7 @@ void LLWindowSDL::gatherInput() case SDL_TEXTINPUT: { auto string = utf8str_to_utf16str( event.text.text ); - mKeyModifiers = gKeyboard->currentMask( FALSE ); + mKeyModifiers = gKeyboard->currentMask( false ); mInputType = "textinput"; for( auto key: string ) { @@ -2010,8 +2010,8 @@ void LLWindowSDL::gatherInput() } // part of the fix for SL-13243 - if (SDLCheckGrabbyKeys(event.key.keysym.sym, TRUE) != 0) - SDLReallyCaptureInput(TRUE); + if (SDLCheckGrabbyKeys(event.key.keysym.sym, true) != 0) + SDLReallyCaptureInput(true); break; @@ -2026,8 +2026,8 @@ void LLWindowSDL::gatherInput() mKeyVirtualKey = SDLK_RETURN; } - if (SDLCheckGrabbyKeys(mKeyVirtualKey, FALSE) == 0) - SDLReallyCaptureInput(FALSE); // part of the fix for SL-13243 + if (SDLCheckGrabbyKeys(mKeyVirtualKey, false) == 0) + SDLReallyCaptureInput(false); // part of the fix for SL-13243 gKeyboard->handleKeyUp(mKeyVirtualKey,mKeyModifiers); break; @@ -2042,7 +2042,7 @@ void LLWindowSDL::gatherInput() openGlCoord.mX *= getSystemUISize(); openGlCoord.mY *= getSystemUISize(); - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); if (event.button.button == SDL_BUTTON_LEFT) // SDL doesn't manage double clicking... { @@ -2109,7 +2109,7 @@ void LLWindowSDL::gatherInput() openGlCoord.mX *= getSystemUISize(); openGlCoord.mY *= getSystemUISize(); - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); if (event.button.button == SDL_BUTTON_LEFT) // left mCallbacks->handleMouseUp(this, openGlCoord, mask); @@ -2143,13 +2143,13 @@ void LLWindowSDL::gatherInput() { LL_INFOS() << "SDL_WINDOWEVENT_ENTER" << LL_ENDL; if(!mHaveInputFocus) mCallbacks->handleFocus(this); - mHaveInputFocus = TRUE; + mHaveInputFocus = true; } else if(event.window.event == SDL_WINDOWEVENT_LEAVE) { LL_INFOS() << "SDL_WINDOWEVENT_LEAVE" << LL_ENDL; if(mHaveInputFocus) mCallbacks->handleFocusLost(this); - mHaveInputFocus = FALSE; + mHaveInputFocus = false; } else if( event.window.event == SDL_WINDOWEVENT_FOCUS_GAINED ) // <FS:ND> What about SDL_WINDOWEVENT_ENTER (mouse focus) { @@ -2176,14 +2176,14 @@ void LLWindowSDL::gatherInput() else if(event.window.event == SDL_WINDOWEVENT_MINIMIZED) { LL_INFOS() << "SDL_WINDOWEVENT_MINIMIZED" << LL_ENDL; - if(!mIsMinimized) mCallbacks->handleActivate(this,FALSE); - mIsMinimized = TRUE; + if(!mIsMinimized) mCallbacks->handleActivate(this,false); + mIsMinimized = true; } else if(event.window.event == SDL_WINDOWEVENT_MAXIMIZED) { LL_INFOS() << "SDL_WINDOWEVENT_MAXIMIZED" << LL_ENDL; - if(mIsMinimized) mCallbacks->handleActivate(this,TRUE); - mIsMinimized = FALSE; + if(mIsMinimized) mCallbacks->handleActivate(this,true); + mIsMinimized = false; } */ else if (event.window.event == SDL_WINDOWEVENT_EXPOSED) @@ -2228,8 +2228,8 @@ void LLWindowSDL::gatherInput() // expired. if (mFlashing && mFlashTimer.hasExpired()) { - x11_set_urgent(FALSE); - mFlashing = FALSE; + x11_set_urgent(false); + mFlashing = false; } #endif // LL_X11 } @@ -2280,10 +2280,10 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty U8 srcred = pixelp[0]; U8 srcgreen = pixelp[1]; U8 srcblue = pixelp[2]; - BOOL mask_bit = (srcred != 200) + bool mask_bit = (srcred != 200) || (srcgreen != 200) || (srcblue != 200); - BOOL data_bit = mask_bit && (srcgreen <= 80);//not 0x80 + bool data_bit = mask_bit && (srcgreen <= 80);//not 0x80 unsigned char bit_offset = (cursurface->w/8) * i + j/8; cursor_data[bit_offset] |= (data_bit) << (7 - (j&7)); @@ -2442,8 +2442,8 @@ void LLWindowSDL::hideCursor() if(!mCursorHidden) { // LL_INFOS() << "hideCursor: hiding" << LL_ENDL; - mCursorHidden = TRUE; - mHideCursorPermanent = TRUE; + mCursorHidden = true; + mHideCursorPermanent = true; SDL_ShowCursor(0); } else @@ -2457,8 +2457,8 @@ void LLWindowSDL::showCursor() if(mCursorHidden) { // LL_INFOS() << "showCursor: showing" << LL_ENDL; - mCursorHidden = FALSE; - mHideCursorPermanent = FALSE; + mCursorHidden = false; + mHideCursorPermanent = false; SDL_ShowCursor(1); } else @@ -2480,7 +2480,7 @@ void LLWindowSDL::hideCursorUntilMouseMove() if (!mHideCursorPermanent) { hideCursor(); - mHideCursorPermanent = FALSE; + mHideCursorPermanent = false; } } @@ -2541,9 +2541,9 @@ S32 OSMessageBoxSDL(const std::string& text, const std::string& caption, U32 typ return OSBTN_CANCEL; } -BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b) +bool LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b) { - return (FALSE); + return (false); } #if LL_DARWIN @@ -2743,7 +2743,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) void LLWindowSDL::openFile(const std::string& file_name) { - spawnWebBrowser("file://"+file_name,TRUE); + spawnWebBrowser("file://"+file_name,true); } void *LLWindowSDL::getPlatformWindow() @@ -2916,17 +2916,6 @@ void LLWindowSDL::toggleVSync(bool enable_vsync) } } -U32 LLWindowSDL::getAvailableVRAMMegabytes() -{ -#if LL_DARWIN - static const U32 mb = 1024*1024; - static const U32 total_factor = 2; - return gGLManager.mVRAM - (LLImageGL::getTextureBytesAllocated() * total_factor/mb); -#else - return 4096; -#endif -} - void LLWindowSDL::setLanguageTextInput(const LLCoordGL& position) { LLCoordWindow win_pos; |