Changeset 104244 in vbox
- Timestamp:
- Apr 9, 2024 7:40:39 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r104175 r104244 983 983 RT_NOREF(pThisCC, addr); 984 984 985 if (pThis->vbe_index <= VBE_DISPI_INDEX_NB) { 985 uint16_t const idxVbe = pThis->vbe_index; 986 if (idxVbe <= VBE_DISPI_INDEX_NB) 987 { 988 RT_UNTRUSTED_VALIDATED_FENCE(); 989 986 990 bool fRecalculate = false; 987 Log(("VBE: write index=0x%x val=0x%x\n", pThis->vbe_index, val));988 switch( pThis->vbe_index) {991 Log(("VBE: write index=0x%x val=0x%x\n", idxVbe, val)); 992 switch(idxVbe) { 989 993 case VBE_DISPI_INDEX_ID: 990 994 if (val == VBE_DISPI_ID0 || … … 1001 1005 val == VBE_DISPI_ID_CFG) 1002 1006 { 1003 pThis->vbe_regs[ pThis->vbe_index] = val;1007 pThis->vbe_regs[VBE_DISPI_INDEX_ID] = val; 1004 1008 } 1005 1009 break; … … 1007 1011 if (val <= VBE_DISPI_MAX_XRES) 1008 1012 { 1009 pThis->vbe_regs[ pThis->vbe_index] = val;1013 pThis->vbe_regs[VBE_DISPI_INDEX_XRES] = val; 1010 1014 pThis->vbe_regs[VBE_DISPI_INDEX_VIRT_WIDTH] = val; 1011 1015 fRecalculate = true; … … 1014 1018 case VBE_DISPI_INDEX_YRES: 1015 1019 if (val <= VBE_DISPI_MAX_YRES) 1016 pThis->vbe_regs[ pThis->vbe_index] = val;1020 pThis->vbe_regs[VBE_DISPI_INDEX_YRES] = val; 1017 1021 break; 1018 1022 case VBE_DISPI_INDEX_BPP: … … 1021 1025 if (val == 4 || val == 8 || val == 15 || 1022 1026 val == 16 || val == 24 || val == 32) { 1023 pThis->vbe_regs[ pThis->vbe_index] = val;1027 pThis->vbe_regs[VBE_DISPI_INDEX_BPP] = val; 1024 1028 fRecalculate = true; 1025 1029 } … … 1037 1041 if (val > max_bank) 1038 1042 val = max_bank; 1039 pThis->vbe_regs[ pThis->vbe_index] = val;1043 pThis->vbe_regs[VBE_DISPI_INDEX_BANK] = val; 1040 1044 pThis->bank_offset = (val << 16); 1041 1045 … … 1141 1145 pThis->bank_offset = 0; 1142 1146 } 1143 pThis->vbe_regs[ pThis->vbe_index] = val;1147 pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] = val; 1144 1148 /* 1145 1149 * LFB video mode is either disabled or changed. Notify the display … … 1165 1169 case VBE_DISPI_INDEX_Y_OFFSET: 1166 1170 { 1167 pThis->vbe_regs[ pThis->vbe_index] = val;1171 pThis->vbe_regs[idxVbe] = val; 1168 1172 fRecalculate = true; 1169 1173 } … … 1183 1187 break; 1184 1188 case VBE_DISPI_INDEX_CFG: 1185 pThis->vbe_regs[ pThis->vbe_index] = val;1189 pThis->vbe_regs[VBE_DISPI_INDEX_CFG] = val; 1186 1190 break; 1187 1191 default:
Note:
See TracChangeset
for help on using the changeset viewer.