aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llwindow/llwindowwin32.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llwindow/llwindowwin32.cpp')
-rw-r--r--linden/indra/llwindow/llwindowwin32.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp
index 4ad044b..3f33f1a 100644
--- a/linden/indra/llwindow/llwindowwin32.cpp
+++ b/linden/indra/llwindow/llwindowwin32.cpp
@@ -44,6 +44,7 @@
44 44
45// Require DirectInput version 8 45// Require DirectInput version 8
46#define DIRECTINPUT_VERSION 0x0800 46#define DIRECTINPUT_VERSION 0x0800
47
47#include <dinput.h> 48#include <dinput.h>
48 49
49 50
@@ -428,7 +429,7 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width,
428 mhInstance = GetModuleHandle(NULL); 429 mhInstance = GetModuleHandle(NULL);
429 mWndProc = NULL; 430 mWndProc = NULL;
430 431
431 mSwapMethod = SWAP_METHOD_UNDEFINED; 432 mSwapMethod = SWAP_METHOD_EXCHANGE;
432 433
433 // No WPARAM yet. 434 // No WPARAM yet.
434 mLastSizeWParam = 0; 435 mLastSizeWParam = 0;
@@ -774,7 +775,7 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width,
774 attrib_list[cur_attrib++] = GL_TRUE; 775 attrib_list[cur_attrib++] = GL_TRUE;
775 776
776 attrib_list[cur_attrib++] = WGL_COLOR_BITS_ARB; 777 attrib_list[cur_attrib++] = WGL_COLOR_BITS_ARB;
777 attrib_list[cur_attrib++] = 24; 778 attrib_list[cur_attrib++] = 32;
778 779
779 attrib_list[cur_attrib++] = WGL_RED_BITS_ARB; 780 attrib_list[cur_attrib++] = WGL_RED_BITS_ARB;
780 attrib_list[cur_attrib++] = 8; 781 attrib_list[cur_attrib++] = 8;
@@ -1018,6 +1019,11 @@ LLWindowWin32::LLWindowWin32(char *title, char *name, S32 x, S32 y, S32 width,
1018 // based on the system's (or user's) default settings. 1019 // based on the system's (or user's) default settings.
1019 allowLanguageTextInput(NULL, FALSE); 1020 allowLanguageTextInput(NULL, FALSE);
1020 1021
1022 initInputDevices();
1023}
1024
1025void LLWindowWin32::initInputDevices()
1026{
1021 // Direct Input 1027 // Direct Input
1022 HRESULT hr; 1028 HRESULT hr;
1023 1029
@@ -1753,6 +1759,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, LLCoordScreen size, BOOL disa
1753 SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this); 1759 SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this);
1754 show(); 1760 show();
1755 1761
1762 initInputDevices();
1763
1756 // ok to post quit messages now 1764 // ok to post quit messages now
1757 mPostQuit = TRUE; 1765 mPostQuit = TRUE;
1758 return TRUE; 1766 return TRUE;
@@ -1907,6 +1915,9 @@ void LLWindowWin32::initCursors()
1907 mCursor[UI_CURSOR_TOOLBUY] = loadColorCursor(TEXT("TOOLBUY")); 1915 mCursor[UI_CURSOR_TOOLBUY] = loadColorCursor(TEXT("TOOLBUY"));
1908 mCursor[UI_CURSOR_TOOLPAY] = loadColorCursor(TEXT("TOOLPAY")); 1916 mCursor[UI_CURSOR_TOOLPAY] = loadColorCursor(TEXT("TOOLPAY"));
1909 mCursor[UI_CURSOR_TOOLOPEN] = loadColorCursor(TEXT("TOOLOPEN")); 1917 mCursor[UI_CURSOR_TOOLOPEN] = loadColorCursor(TEXT("TOOLOPEN"));
1918 mCursor[UI_CURSOR_TOOLPLAY] = loadColorCursor(TEXT("TOOLPLAY"));
1919 mCursor[UI_CURSOR_TOOLPAUSE] = loadColorCursor(TEXT("TOOLPAUSE"));
1920 mCursor[UI_CURSOR_TOOLMEDIAOPEN] = loadColorCursor(TEXT("TOOLMEDIAOPEN"));
1910 1921
1911 // Note: custom cursors that are not found make LoadCursor() return NULL. 1922 // Note: custom cursors that are not found make LoadCursor() return NULL.
1912 for( S32 i = 0; i < UI_CURSOR_COUNT; i++ ) 1923 for( S32 i = 0; i < UI_CURSOR_COUNT; i++ )
@@ -3196,6 +3207,8 @@ void LLWindowWin32::updateJoystick( )
3196 mJoyAxis[3] = js.lRx/1000.f; 3207 mJoyAxis[3] = js.lRx/1000.f;
3197 mJoyAxis[4] = js.lRy/1000.f; 3208 mJoyAxis[4] = js.lRy/1000.f;
3198 mJoyAxis[5] = js.lRz/1000.f; 3209 mJoyAxis[5] = js.lRz/1000.f;
3210 mJoyAxis[6] = js.rglSlider[0]/1000.f;
3211 mJoyAxis[7] = js.rglSlider[1]/1000.f;
3199 3212
3200 for (U32 i = 0; i < 16; i++) 3213 for (U32 i = 0; i < 16; i++)
3201 { 3214 {