Author: tkreuzer Date: Sat Jan 29 14:57:40 2011 New Revision: 50556
URL: http://svn.reactos.org/svn/reactos?rev=50556&view=rev Log: [VGA_NEW] Fix build with msvc
Modified: branches/cmake-bringup/drivers/video/miniport/vga_new/CMakeLists.txt branches/cmake-bringup/drivers/video/miniport/vga_new/vga.c
Modified: branches/cmake-bringup/drivers/video/miniport/vga_new/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/video/mini... ============================================================================== --- branches/cmake-bringup/drivers/video/miniport/vga_new/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/drivers/video/miniport/vga_new/CMakeLists.txt [iso-8859-1] Sat Jan 29 14:57:40 2011 @@ -11,7 +11,11 @@
target_link_libraries(vga libcntpr)
+if(MSVC) +set_target_properties(vga PROPERTIES COMPILE_FLAGS "/Gz") +else() set_target_properties(vga PROPERTIES COMPILE_FLAGS "-mrtd -fno-builtin") +endif()
set_module_type(vga kernelmodedriver) add_importlibs(vga videoprt)
Modified: branches/cmake-bringup/drivers/video/miniport/vga_new/vga.c URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/video/mini... ============================================================================== --- branches/cmake-bringup/drivers/video/miniport/vga_new/vga.c [iso-8859-1] (original) +++ branches/cmake-bringup/drivers/video/miniport/vga_new/vga.c [iso-8859-1] Sat Jan 29 14:57:40 2011 @@ -93,7 +93,7 @@ PVIDEO_PALETTE_DATA PaletteBuffer, ULONG PaletteBufferSize ); - + VP_STATUS VgaSetColorLookup( PHW_DEVICE_EXTENSION HwDeviceExtension, @@ -846,10 +846,10 @@
case IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES: { - VideoDebugPrint((2, "VgaStartIO - Query Public Address Ranges\n")); - PVIDEO_PUBLIC_ACCESS_RANGES portAccess; ULONG physicalPortLength; + + VideoDebugPrint((2, "VgaStartIO - Query Public Address Ranges\n"));
if (RequestPacket->OutputBufferLength < sizeof(VIDEO_PUBLIC_ACCESS_RANGES)) @@ -882,7 +882,7 @@ // eVb: 1.17 [END] VideoDebugPrint((2, "VgaStartIO - mapping ports to (%x)\n", portAccess->VirtualAddress)); } - + break;
case IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES: @@ -891,7 +891,7 @@
status = ERROR_INVALID_FUNCTION; break; - + // // if we get here, an invalid IoControlCode was specified. // @@ -1371,7 +1371,7 @@ { PVIDEOMODE CurrentMode = HwDeviceExtension->CurrentMode; USHORT i; - + // // Check if the size of the data in the input buffer is large enough. // @@ -1400,9 +1400,9 @@ // // Check SVGA mode // - + if (CurrentMode->bitsPerPlane >= 8) return VbeSetColorLookup(HwDeviceExtension, ClutBuffer); -// eVb: 1.14 [END] +// eVb: 1.14 [END] // // Path for VGA mode // @@ -1507,11 +1507,11 @@ { VP_STATUS Status = NO_ERROR; ULONG Ranges, i; - + // // Try exclusive ranges (vga + ati) // - + Ranges = NUM_VGA_ACCESS_RANGES; for (i = 0; i < Ranges; i++) VgaAccessRange[i].RangeShareable = FALSE; if (VideoPortVerifyAccessRanges(DeviceExtension, Ranges, VgaAccessRange) != NO_ERROR) @@ -1519,14 +1519,14 @@ // // Not worked, try vga only // - + Ranges = 3; if (VideoPortVerifyAccessRanges(DeviceExtension, Ranges, VgaAccessRange) != NO_ERROR) { // // Still not, try shared ranges // - + for (i = 0; i < Ranges; i++) VgaAccessRange[i].RangeShareable = TRUE; Status = VideoPortVerifyAccessRanges(DeviceExtension, Ranges, VgaAccessRange); if (Status == NO_ERROR) @@ -1534,7 +1534,7 @@ // // It did work // - + VideoPortVerifyAccessRanges(DeviceExtension, 0, 0); Status = NO_ERROR; } @@ -1546,7 +1546,7 @@ // // Worked with exclusive, also try shared // - + for (i = 0; i < Ranges; i++) VgaAccessRange[i].RangeShareable = TRUE; Status = VideoPortVerifyAccessRanges(DeviceExtension, Ranges, VgaAccessRange); }