Changeset 8337 in vbox
- Timestamp:
- Apr 23, 2008 5:05:13 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r8155 r8337 183 183 void cannotFindMachineByName (const CVirtualBox &vbox, const QString &name); 184 184 185 void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp );185 void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp, ULONG64 aMinVRAM); 186 186 187 187 bool confirmMachineDeletion (const CMachine &machine); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r8324 r8337 1962 1962 /* Check if the Guest Video RAM enough for the seamless mode. */ 1963 1963 QRect screen = QApplication::desktop()->screenGeometry (this); 1964 ULONG64 availBits = (csession.GetMachine().GetVRAMSize() /* vram */1964 ULONG64 availBits = csession.GetMachine().GetVRAMSize() /* vram */ 1965 1965 * _1M /* mb to bytes */ 1966 - 4096 /* adapter info */1967 - _1M /* current cache - may be changed in future */)1968 / csession.GetMachine().GetMonitorCount()1969 1966 * 8; /* to bits */ 1970 ULONG64 usedBits = screen.width() /* display width */ 1967 ULONG guestBpp = console->console().GetDisplay().GetBitsPerPixel(); 1968 ULONG64 usedBits = (screen.width() /* display width */ 1971 1969 * screen.height() /* display height */ 1972 * QColor::numBitPlanes(); /* bit per pixel */ 1970 * guestBpp 1971 + _1M * 8) /* current cache per screen - may be changed in future */ 1972 * csession.GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */ 1973 + 4096 * 8; /* adapter info */ 1973 1974 CGuest guest = console->console().GetGuest(); 1974 1975 ULONG maxWidth = guest.GetMaxGuestWidth(); … … 1981 1982 { 1982 1983 vboxProblem().cannotEnterSeamlessMode (screen.width(), 1983 screen.height(), QColor::numBitPlanes());1984 screen.height(), guestBpp, (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M); 1984 1985 return false; 1985 1986 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r8202 r8337 935 935 void VBoxProblemReporter::cannotEnterSeamlessMode (ULONG aWidth, 936 936 ULONG aHeight, 937 ULONG aBpp) 937 ULONG aBpp, 938 ULONG64 aMinVRAM) 938 939 { 939 940 message (&vboxGlobal().consoleWnd(), Error, … … 942 943 "<p>You should configure the VM to have at least <b>%1</b> " 943 944 "of video memory.</p>") 944 .arg (VBoxGlobal::formatSize ((ULONG64) (aWidth * aHeight * 945 aBpp / 8 + _1M - 1)))); 945 .arg (VBoxGlobal::formatSize (aMinVRAM))); 946 946 } 947 947 -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxProblemReporter.h
r8155 r8337 182 182 void cannotFindMachineByName (const CVirtualBox &vbox, const QString &name); 183 183 184 void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp );184 void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp, ULONG64 aMinVRAM); 185 185 186 186 bool confirmMachineDeletion (const CMachine &machine); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r8323 r8337 1985 1985 /* Check if the Guest Video RAM enough for the seamless mode. */ 1986 1986 QRect screen = QApplication::desktop()->screenGeometry (this); 1987 ULONG64 availBits = (csession.GetMachine().GetVRAMSize() /* vram */1987 ULONG64 availBits = csession.GetMachine().GetVRAMSize() /* vram */ 1988 1988 * _1M /* mb to bytes */ 1989 - 4096 /* adapter info */1990 - _1M /* current cache - may be changed in future */)1991 / csession.GetMachine().GetMonitorCount()1992 1989 * 8; /* to bits */ 1993 ULONG64 usedBits = screen.width() /* display width */ 1990 ULONG guestBpp = console->console().GetDisplay().GetBitsPerPixel(); 1991 ULONG64 usedBits = (screen.width() /* display width */ 1994 1992 * screen.height() /* display height */ 1995 * depth(); /* bit per pixel */ 1993 * guestBpp 1994 + _1M * 8) /* current cache per screen - may be changed in future */ 1995 * csession.GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */ 1996 + 4096 * 8; /* adapter info */ 1996 1997 CGuest guest = console->console().GetGuest(); 1997 1998 ULONG maxWidth = guest.GetMaxGuestWidth(); … … 2004 2005 { 2005 2006 vboxProblem().cannotEnterSeamlessMode (screen.width(), 2006 screen.height(), depth());2007 screen.height(), guestBpp, (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M); 2007 2008 return false; 2008 2009 } -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp
r8155 r8337 943 943 void VBoxProblemReporter::cannotEnterSeamlessMode (ULONG aWidth, 944 944 ULONG aHeight, 945 ULONG aBpp) 945 ULONG aBpp, 946 ULONG64 aMinVRAM) 946 947 { 947 948 message (&vboxGlobal().consoleWnd(), Error, … … 950 951 "<p>You should configure the VM to have at least <b>%1</b> " 951 952 "of video memory.</p>") 952 .arg (VBoxGlobal::formatSize ((ULONG64) (aWidth * aHeight * 953 aBpp / 8 + _1M - 1)))); 953 .arg (VBoxGlobal::formatSize (aMinVRAM))); 954 954 } 955 955
Note:
See TracChangeset
for help on using the changeset viewer.