Changeset 5158 in vbox for trunk/src/VBox/Frontends/VBoxBFE
- Timestamp:
- Oct 4, 2007 2:49:25 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 25051
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r5126 r5158 169 169 static const char *pszBootDevice = "IDE"; 170 170 static uint32_t g_u32MemorySizeMB = 128; 171 static uint32_t g_u32VRamSize MB = 4;171 static uint32_t g_u32VRamSize = 4 * _1M; 172 172 #ifdef VBOXSDL_ADVANCED_OPTIONS 173 173 static bool g_fRawR0 = true; … … 408 408 char *secureLabelFontFile = NULL; 409 409 #endif 410 #ifdef RT_OS_L4 411 uint32_t u32MaxVRAM; 412 #endif 413 410 414 RTPrintf("VirtualBox Simple SDL GUI built %s %s\n", __DATE__, __TIME__); 411 415 … … 476 480 if (++curArg >= argc) 477 481 return SyntaxError("missing argument for vram size!\n"); 478 rc = RTStrToUInt32Ex(argv[curArg], NULL, 0, &g_u32VRamSizeMB); 482 uint32_t uVRAMMB; 483 rc = RTStrToUInt32Ex(argv[curArg], NULL, 0, &uVRAMMB); 484 g_u32VRamSize = uVRAMMB * _1M; 479 485 if (VBOX_FAILURE(rc)) 480 486 return SyntaxError("bad video ram size: %s (error %Vrc)\n", … … 816 822 #ifdef RT_OS_L4 817 823 /* The L4 console provides (currently) a fixed resolution. */ 818 if (g_u32VRamSize MB * _1M >=gFramebuffer->getHostXres()819 820 824 if (g_u32VRamSize >= gFramebuffer->getHostXres() 825 * gFramebuffer->getHostYres() 826 * (gDisplay->getBitsPerPixel() / 8)) 821 827 gDisplay->SetVideoModeHint(gFramebuffer->getHostXres(), gFramebuffer->getHostYres(), 0, 0); 828 /* Limit the VRAM of the guest to the amount of memory we got actually 829 * mapped from the L4 console. */ 830 u32MaxVRAM = (gFramebuffer->getHostYres() + 18) /* don't omit the status bar */ 831 * gFramebuffer->getHostXres() 832 * (gDisplay->getBitsPerPixel() / 8); 833 if (g_u32VRamSize > u32MaxVRAM) 834 { 835 RTPrintf("Limiting the video memory to %u bytes\n", u32MaxVRAM); 836 g_u32VRamSize = u32MaxVRAM; 837 } 822 838 #endif 823 839 … … 1439 1455 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); UPDATE_RC(); 1440 1456 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); UPDATE_RC(); 1441 rc = CFGMR3InsertInteger(pCfg, "VRamSize", g_u32VRamSize MB * _1M);UPDATE_RC();1457 rc = CFGMR3InsertInteger(pCfg, "VRamSize", g_u32VRamSize); UPDATE_RC(); 1442 1458 1443 1459 #ifdef RT_OS_L4
Note:
See TracChangeset
for help on using the changeset viewer.