Changeset 2079 in vbox for trunk/src/VBox/Devices/Graphics
- Timestamp:
- Apr 13, 2007 2:39:03 PM (18 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r2021 r2079 56 56 /** The minimum amount of VRAM. */ 57 57 #define VGA_VRAM_MIN (_1M) 58 /** The maximum number of monitors. */ 59 #define VGA_MONITORS_MAX 64 58 60 59 61 /** The size of the VGA GC mapping. … … 584 586 break; 585 587 } 588 } else if (s->vbe_index == VBE_DISPI_INDEX_CMONITORS) { 589 val = s->monitor_count; 586 590 } else { 587 591 val = s->vbe_regs[s->vbe_index]; … … 4286 4290 #ifdef CONFIG_BOCHS_VBE 4287 4291 pData->vbe_regs[VBE_DISPI_INDEX_ID] = VBE_DISPI_ID0; 4292 pData->vbe_regs[VBE_DISPI_INDEX_CMONITORS] = pData->monitor_count; 4288 4293 pData->vbe_bank_mask = ((pData->vram_size >> 16) - 1); 4289 4294 #endif /* CONFIG_BOCHS_VBE */ … … 4513 4518 } 4514 4519 Log(("VGA: VRamSize=%#x\n", pData->vram_size)); 4520 4521 rc = CFGMR3QueryU32(pCfgHandle, "MonitorCount", &pData->monitor_count); 4522 if (VBOX_FAILURE(rc) || !pData->monitor_count) 4523 pData->monitor_count = 1; 4524 else if (pData->monitor_count > VGA_MONITORS_MAX) 4525 { 4526 AssertMsgFailed(("monitor_count=%d max=%d\n", pData->monitor_count, VGA_MONITORS_MAX)); 4527 pData->monitor_count = 1; 4528 } 4529 pData->vbe_regs[VBE_DISPI_INDEX_CMONITORS] = pData->monitor_count; 4530 Log(("VGA: MonitorCount=%d\n", pData->monitor_count)); 4515 4531 4516 4532 pData->fGCEnabled = true; -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r488 r2079 74 74 #define VBE_DISPI_INDEX_X_OFFSET 0x8 75 75 #define VBE_DISPI_INDEX_Y_OFFSET 0x9 76 #define VBE_DISPI_INDEX_NB 0xa 76 #define VBE_DISPI_INDEX_CMONITORS 0xa 77 #define VBE_DISPI_INDEX_NB 0xb 77 78 78 79 #define VBE_DISPI_ID0 0xB0C0 … … 276 277 uint32_t cMilliesRefreshInterval; 277 278 279 /** Number of virtual monitors */ 280 uint32_t monitor_count; 281 uint32_t Padding0; /* May be removed if more data is added */ 282 278 283 /** Size of the buffer*/ 279 284 uint32_t cbExtVRAM; … … 283 288 uint32_t Alignment0; 284 289 #endif 290 285 291 /** The PCI device. */ 286 292 PCIDEVICE Dev;
Note:
See TracChangeset
for help on using the changeset viewer.