diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp index 85836af..c375e32 100644 --- a/linden/indra/llwindow/llwindowsdl.cpp +++ b/linden/indra/llwindow/llwindowsdl.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -205,7 +206,7 @@ BOOL check_for_card(const char* RENDERER, const char* bad_card) | |||
205 | if (!strncasecmp(RENDERER, bad_card, strlen(bad_card))) | 206 | if (!strncasecmp(RENDERER, bad_card, strlen(bad_card))) |
206 | { | 207 | { |
207 | char buffer[1024]; /* Flawfinder: ignore */ | 208 | char buffer[1024]; /* Flawfinder: ignore */ |
208 | snprintf(buffer, sizeof(buffer), /* Flawfinder: ignore */ | 209 | snprintf(buffer, sizeof(buffer), |
209 | "Your video card appears to be a %s, which Second Life does not support.\n" | 210 | "Your video card appears to be a %s, which Second Life does not support.\n" |
210 | "\n" | 211 | "\n" |
211 | "Second Life requires a video card with 32 Mb of memory or more, as well as\n" | 212 | "Second Life requires a video card with 32 Mb of memory or more, as well as\n" |
@@ -314,7 +315,7 @@ static SDL_Surface *Load_BMP_Resource(const char *basename) | |||
314 | char path_buffer[PATH_BUFFER_SIZE]; /* Flawfinder: ignore */ | 315 | char path_buffer[PATH_BUFFER_SIZE]; /* Flawfinder: ignore */ |
315 | 316 | ||
316 | // Figure out where our BMP is living on the disk | 317 | // Figure out where our BMP is living on the disk |
317 | snprintf(path_buffer, PATH_BUFFER_SIZE-1, "%s%sres-sdl%s%s", /* Flawfinder: ignore */ | 318 | snprintf(path_buffer, PATH_BUFFER_SIZE-1, "%s%sres-sdl%s%s", |
318 | gDirUtilp->getAppRODataDir().c_str(), | 319 | gDirUtilp->getAppRODataDir().c_str(), |
319 | gDirUtilp->getDirDelimiter().c_str(), | 320 | gDirUtilp->getDirDelimiter().c_str(), |
320 | gDirUtilp->getDirDelimiter().c_str(), | 321 | gDirUtilp->getDirDelimiter().c_str(), |
@@ -485,7 +486,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, B | |||
485 | mFullscreenRefresh = -1; | 486 | mFullscreenRefresh = -1; |
486 | 487 | ||
487 | char error[256]; /* Flawfinder: ignore */ | 488 | char error[256]; /* Flawfinder: ignore */ |
488 | snprintf(error, sizeof(error), "Unable to run fullscreen at %d x %d.\nRunning in window.", width, height); /* Flawfinder: ignore */ | 489 | snprintf(error, sizeof(error), "Unable to run fullscreen at %d x %d.\nRunning in window.", width, height); |
489 | OSMessageBox(error, "Error", OSMB_OK); | 490 | OSMessageBox(error, "Error", OSMB_OK); |
490 | } | 491 | } |
491 | } | 492 | } |
@@ -1184,7 +1185,7 @@ x11clipboard_type convert_format(int type) | |||
1184 | these right now, and support is skeletal. */ | 1185 | these right now, and support is skeletal. */ |
1185 | char format[sizeof(FORMAT_PREFIX)+8+1]; /* Flawfinder: ignore */ | 1186 | char format[sizeof(FORMAT_PREFIX)+8+1]; /* Flawfinder: ignore */ |
1186 | 1187 | ||
1187 | snprintf(format, sizeof(format), "%s%08lx", FORMAT_PREFIX, (unsigned long)type); /* Flawfinder: ignore */ | 1188 | snprintf(format, sizeof(format), "%s%08lx", FORMAT_PREFIX, (unsigned long)type); |
1188 | return XInternAtom(gWindowImplementation->mSDL_Display, | 1189 | return XInternAtom(gWindowImplementation->mSDL_Display, |
1189 | format, False); | 1190 | format, False); |
1190 | } | 1191 | } |
@@ -1871,7 +1872,7 @@ void LLWindowSDL::gatherInput() | |||
1871 | // the locale to protect it, as exotic/non-C locales | 1872 | // the locale to protect it, as exotic/non-C locales |
1872 | // causes our code lots of general critical weirdness | 1873 | // causes our code lots of general critical weirdness |
1873 | // and crashness. (SL-35450) | 1874 | // and crashness. (SL-35450) |
1874 | char *saved_locale = setlocale(LC_ALL, NULL); | 1875 | std::string saved_locale = setlocale(LC_ALL, NULL); |
1875 | 1876 | ||
1876 | // Do a limited number of pumps so SL doesn't starve! | 1877 | // Do a limited number of pumps so SL doesn't starve! |
1877 | // FIXME - this should ideally be time-limited, not count-limited. | 1878 | // FIXME - this should ideally be time-limited, not count-limited. |
@@ -1880,8 +1881,7 @@ void LLWindowSDL::gatherInput() | |||
1880 | if (gtk_events_pending()) | 1881 | if (gtk_events_pending()) |
1881 | gtk_main_iteration(); | 1882 | gtk_main_iteration(); |
1882 | 1883 | ||
1883 | if (saved_locale) | 1884 | setlocale(LC_ALL, saved_locale.c_str() ); |
1884 | setlocale(LC_ALL, saved_locale); | ||
1885 | } | 1885 | } |
1886 | #endif // LL_GTK && LL_LIBXUL_ENABLED | 1886 | #endif // LL_GTK && LL_LIBXUL_ENABLED |
1887 | 1887 | ||