[ros-diffs] [greatlrd] 15538: partially implemented fullscreen in changedisplay setting

greatlrd at svn.reactos.com greatlrd at svn.reactos.com
Fri May 27 00:41:33 CEST 2005


partially implemented fullscreen in changedisplay setting
I can play winquake in fullscreen now :)
Modified: trunk/reactos/subsys/win32k/objects/dc.c
  _____  

Modified: trunk/reactos/subsys/win32k/objects/dc.c
--- trunk/reactos/subsys/win32k/objects/dc.c	2005-05-26 21:55:34 UTC
(rev 15537)
+++ trunk/reactos/subsys/win32k/objects/dc.c	2005-05-26 22:41:31 UTC
(rev 15538)
@@ -2507,6 +2507,7 @@

   BOOLEAN Reset = FALSE;
   BOOLEAN SetPrimary = FALSE;
   LONG Ret;
+  NTSTATUS Status;
 
   DPRINT1("display flag : %x\n",dwflags);
 
@@ -2545,10 +2546,29 @@
   
   if ((dwflags & CDS_FULLSCREEN) == CDS_FULLSCREEN)
   {
+   DEVMODE lpDevMode;
    /* Full Screen */
    dwflags &= ~CDS_FULLSCREEN;
-   DPRINT1("flag CDS_FULLSCREEN UNIMPLEMENT");
+   DPRINT1("flag CDS_FULLSCREEN partially implemented");
    Ret = DISP_CHANGE_FAILED;
+
+   lpDevMode.dmBitsPerPel =0;
+   lpDevMode.dmPelsWidth  =0;
+   lpDevMode.dmPelsHeight =0;
+   lpDevMode.dmDriverExtra =0;
+
+   lpDevMode.dmSize = sizeof(DEVMODE);
+   Status = IntEnumDisplaySettings(pDeviceName,  ENUM_CURRENT_SETTINGS,
&lpDevMode, 0);
+   if (!NT_SUCCESS(Status)) return DISP_CHANGE_FAILED;
+
+   DPRINT1("Req Mode     : %d x %d x %d\n",
DevMode->dmPelsWidth,DevMode->dmPelsHeight,DevMode->dmBitsPerPel);
+   DPRINT1("Current Mode : %d x %d x %d\n",
lpDevMode.dmPelsWidth,lpDevMode.dmPelsHeight, lpDevMode.dmBitsPerPel);
+
+
+   if ((lpDevMode.dmBitsPerPel == DevMode->dmBitsPerPel) &&
+       (lpDevMode.dmPelsWidth  == DevMode->dmPelsWidth) &&
+       (lpDevMode.dmPelsHeight == DevMode->dmPelsHeight))
+	   Ret = DISP_CHANGE_SUCCESSFUL; 
   }
 
   if ((dwflags & CDS_VIDEOPARAMETERS) == CDS_VIDEOPARAMETERS)
@@ -2571,8 +2591,7 @@
 	  	WCHAR KernelModeNameBuffer[256];
 		UNICODE_STRING RegistryKey;
 		WCHAR RegistryKeyBuffer[512];
-		PDEVICE_OBJECT DeviceObject;
-		NTSTATUS Status;
+		PDEVICE_OBJECT DeviceObject;		
 		ULONG LastSlash;
 		OBJECT_ATTRIBUTES ObjectAttributes;
 		HANDLE DevInstRegKey;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050527/b1bb60b3/attachment.html


More information about the Ros-diffs mailing list