Changeset 26532 in vbox
- Timestamp:
- Feb 15, 2010 10:37:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r26475 r26532 1877 1877 } 1878 1878 1879 #if 0/* Enable+edit this to play with the virtual USB devices). */1879 #if 1 /* Enable+edit this to play with the virtual USB devices). */ 1880 1880 if (!pUsbDevices) 1881 1881 { … … 1883 1883 } 1884 1884 1885 # if 1/* Virtual MSD*/1885 # if 0 /* Virtual MSD*/ 1886 1886 1887 1887 rc = CFGMR3InsertNode(pUsbDevices, "Msd", &pDev); RC_CHECK(); … … 1905 1905 rc = CFGMR3InsertString(pCfg, "Format", "VDI"); RC_CHECK(); 1906 1906 # endif 1907 # if 1 /* Virtual USB Mouse*/ 1908 1909 rc = CFGMR3InsertNode(pUsbDevices, "HidMouse", &pDev); RC_CHECK(); 1910 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1911 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1912 1913 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1914 rc = CFGMR3InsertString(pLunL0, "Driver", "MouseQueue"); RC_CHECK(); 1915 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1916 rc = CFGMR3InsertInteger(pCfg, "QueueSize", 128); RC_CHECK(); 1917 1918 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 1919 rc = CFGMR3InsertString(pLunL1, "Driver", "MainMouse"); RC_CHECK(); 1920 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 1921 Mouse *pMouse = pConsole->mMouse; 1922 rc = CFGMR3InsertInteger(pCfg, "Object", (uintptr_t)pMouse); RC_CHECK(); 1923 # endif 1924 # if 1 /* Virtual USB Keyboard */ 1925 1926 rc = CFGMR3InsertNode(pUsbDevices, "HidKeyboard", &pDev); RC_CHECK(); 1927 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1928 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1929 1930 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1931 rc = CFGMR3InsertString(pLunL0, "Driver", "KeyboardQueue"); RC_CHECK(); 1932 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1933 rc = CFGMR3InsertInteger(pCfg, "QueueSize", 64); RC_CHECK(); 1934 1935 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 1936 rc = CFGMR3InsertString(pLunL1, "Driver", "MainKeyboard"); RC_CHECK(); 1937 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 1938 Keyboard *pKeyboard = pConsole->mKeyboard; 1939 rc = CFGMR3InsertInteger(pCfg, "Object", (uintptr_t)pKeyboard); RC_CHECK(); 1940 # endif 1907 1908 /* Virtual USB Mouse*/ 1909 PointingHidType_T aPointingHid; 1910 hrc = pMachine->COMGETTER(PointingHidType)(&aPointingHid); H(); 1911 if (aPointingHid == PointingHidType_USBMouse) 1912 { 1913 rc = CFGMR3InsertNode(pUsbDevices, "HidMouse", &pDev); RC_CHECK(); 1914 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1915 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1916 1917 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1918 rc = CFGMR3InsertString(pLunL0, "Driver", "MouseQueue"); RC_CHECK(); 1919 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1920 rc = CFGMR3InsertInteger(pCfg, "QueueSize", 128); RC_CHECK(); 1921 1922 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 1923 rc = CFGMR3InsertString(pLunL1, "Driver", "MainMouse"); RC_CHECK(); 1924 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 1925 pMouse = pConsole->mMouse; 1926 rc = CFGMR3InsertInteger(pCfg, "Object", (uintptr_t)pMouse); RC_CHECK(); 1927 } 1928 1929 /* Virtual USB Keyboard */ 1930 KeyboardHidType_T aKbdHid; 1931 hrc = pMachine->COMGETTER(KeyboardHidType)(&aKbdHid); H(); 1932 if (aKbdHid == KeyboardHidType_USBKeyboard) 1933 { 1934 rc = CFGMR3InsertNode(pUsbDevices, "HidKeyboard", &pDev); RC_CHECK(); 1935 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1936 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1937 1938 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1939 rc = CFGMR3InsertString(pLunL0, "Driver", "KeyboardQueue"); RC_CHECK(); 1940 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1941 rc = CFGMR3InsertInteger(pCfg, "QueueSize", 64); RC_CHECK(); 1942 1943 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 1944 rc = CFGMR3InsertString(pLunL1, "Driver", "MainKeyboard"); RC_CHECK(); 1945 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 1946 pKeyboard = pConsole->mKeyboard; 1947 rc = CFGMR3InsertInteger(pCfg, "Object", (uintptr_t)pKeyboard); RC_CHECK(); 1948 } 1941 1949 #endif 1942 1950 }
Note:
See TracChangeset
for help on using the changeset viewer.