Changeset 15876 in vbox for trunk/src/VBox
- Timestamp:
- Jan 8, 2009 5:15:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r15872 r15876 2420 2420 } 2421 2421 2422 #ifdef VBOX 2423 static DECLCALLBACK(void) voidUpdateRect(PPDMIDISPLAYCONNECTOR pInterface, uint32_t x, uint32_t y, uint32_t cx, uint32_t cy) 2424 { 2425 } 2426 #endif /* VBOX */ 2427 2428 2422 2429 #define GMODE_TEXT 0 2423 2430 #define GMODE_GRAPH 1 … … 2462 2469 } 2463 2470 2471 #ifdef VBOX 2472 if (s->graphic_mode == -1) { 2473 /* A full update is requested. Special processing for a "blank" mode is required. */ 2474 typedef DECLCALLBACK(void) FNUPDATERECT(PPDMIDISPLAYCONNECTOR pInterface, uint32_t x, uint32_t y, uint32_t cx, uint32_t cy); 2475 typedef FNUPDATERECT *PFNUPDATERECT; 2476 2477 PFNUPDATERECT pfnUpdateRect = NULL; 2478 2479 /* Detect the "screen blank" conditions. */ 2480 int fBlank = 0; 2481 if (!(s->ar_index & 0x20) || (s->sr[0x01] & 0x20)) { 2482 fBlank = 1; 2483 } 2484 2485 if (fBlank) { 2486 /* Provide a void pfnUpdateRect callback. */ 2487 if (s->pDrv) { 2488 pfnUpdateRect = s->pDrv->pfnUpdateRect; 2489 s->pDrv->pfnUpdateRect = voidUpdateRect; 2490 } 2491 } 2492 2493 /* Do a complete redraw, which will pick up a new screen resolution. */ 2494 if (s->gr[6] & 1) { 2495 s->graphic_mode = GMODE_GRAPH; 2496 rc = vga_draw_graphic(s, 1); 2497 } else { 2498 s->graphic_mode = GMODE_TEXT; 2499 rc = vga_draw_text(s, 1); 2500 } 2501 2502 if (fBlank) { 2503 /* Set the current mode and restore the callback. */ 2504 s->graphic_mode = GMODE_BLANK; 2505 if (s->pDrv) { 2506 s->pDrv->pfnUpdateRect = pfnUpdateRect; 2507 } 2508 } 2509 return rc; 2510 } 2511 #endif /* VBOX */ 2512 2464 2513 full_update = 0; 2465 if (!(s->ar_index & 0x20) ) {2514 if (!(s->ar_index & 0x20) || (s->sr[0x01] & 0x20)) { 2466 2515 graphic_mode = GMODE_BLANK; 2467 2516 } else {
Note:
See TracChangeset
for help on using the changeset viewer.