Changeset 587 for trunk/src/ddraw/OS2DDRAW.CPP
- Timestamp:
- Aug 19, 1999, 8:08:48 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2DDRAW.CPP
r536 r587 26 26 #define KEY_DIRECT2DRAW "\\Software\\Win32OS2\\Direct2\\Draw" 27 27 28 FOURCC SupportedFourCCs[] = {FOURCC_ LUT8,FOURCC_R565,FOURCC_RGB3,FOURCC_RGB4};28 FOURCC SupportedFourCCs[] = {FOURCC_SCRN,FOURCC_LUT8,FOURCC_R565,FOURCC_RGB3,FOURCC_RGB4}; 29 29 //****************************************************************************** 30 30 //****************************************************************************** … … 32 32 Referenced(0), lastError(DD_OK), 33 33 pFrameBuffer(NULL), hwndClient(0), screenwidth(640), 34 screenheight(480), screenbpp(8),PrimaryExists(FALSE) 34 screenheight(480), screenbpp(8),PrimaryExists(FALSE),pPrimSurf(NULL) 35 35 36 36 { … … 337 337 #endif 338 338 339 newpal = new OS2IDirectDrawPalette( me, palsize, lpColorTable, dwFlags);339 newpal = new OS2IDirectDrawPalette((VOID*)me, palsize, lpColorTable, dwFlags); 340 340 341 341 if(newpal == NULL) … … 754 754 { 755 755 #ifdef DEBUG 756 WriteLog(" GetCaps\n");756 WriteLog("DDGetCaps of "); 757 757 #endif 758 758 … … 764 764 // Caller want Driver Caps 765 765 766 WriteLog("Driver\n"); 767 766 768 if(sizeof(DDCAPS)!=lpDDDriverCaps->dwSize) 769 { 770 WriteLog("Size Not Set\n"); 767 771 return(DDERR_INVALIDPARAMS); 768 772 } 769 773 // Clear structure so we only have to set the supported flags 770 774 … … 777 781 778 782 // Now report the CAPs back which we support 779 lpDDDriverCaps->dwCaps = DDCAPS_BLT | // We do blitting780 DDCAPS_BLTCOLORFILL | // We do colorfills781 DDCAPS_COLORKEY | // We support Colorkeying782 DDCAPS_COLORKEYHWASSIST | // But we (may) use the CPU783 DDCAPS_GDI | // Maybe check if we are on Voodoo ?784 DDCAPS_PALETTEVSYNC; // Got VSync783 lpDDDriverCaps->dwCaps = DDCAPS_BLT | // We do blitting 784 DDCAPS_BLTCOLORFILL | // We do colorfills 785 DDCAPS_COLORKEY | // We support Colorkeying 786 DDCAPS_COLORKEYHWASSIST | // But we (may) use the CPU 787 DDCAPS_GDI | // Maybe check if we are on Voodoo ? 788 DDCAPS_PALETTEVSYNC; // Got VSync 785 789 786 790 lpDDDriverCaps->dwCaps2 = DDCAPS2_CERTIFIED | // Who cares so say yes … … 843 847 if(NULL!=lpDDHELCaps) 844 848 { 845 // Caler wants HEL Caps 849 // Caller wants HEL Caps 850 WriteLog(" HEL\n"); 851 846 852 if(sizeof(DDCAPS)!=lpDDHELCaps->dwSize) 853 { 854 WriteLog("Size Not Set\n"); 847 855 return(DDERR_INVALIDPARAMS); 856 } 857 // Clear structure so we only have to set the supported flags 858 859 860 memset(lpDDHELCaps,0,sizeof(DDCAPS)); 861 862 863 // Reset the size 864 lpDDHELCaps->dwSize = sizeof(DDCAPS); 865 866 // Now report the CAPs back which we support 867 lpDDHELCaps->dwCaps = DDCAPS_BLT | // We do blitting 868 DDCAPS_BLTCOLORFILL | // We do colorfills 869 DDCAPS_COLORKEY | // We support Colorkeying 870 DDCAPS_COLORKEYHWASSIST | // But we (may) use the CPU 871 DDCAPS_GDI | // Maybe check if we are on Voodoo ? 872 DDCAPS_PALETTEVSYNC; // Got VSync 873 874 lpDDHELCaps->dwCaps2 = DDCAPS2_CERTIFIED | // Who cares so say yes 875 DDCAPS2_CANRENDERWINDOWED | // Better check for Voodoo ?! 876 DDCAPS2_COPYFOURCC | // yepp memcpy will do this 877 DDCAPS2_NONLOCALVIDMEM | // All surfaces are in memory 878 DDCAPS2_WIDESURFACES; // Any size you want! 879 880 lpDDHELCaps->dwCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 881 882 // lpDDDriverCaps->dwFXCaps = DDFXCAPS_BLTMIRRORUPDOWN; // DIVE supports this, do we also ? 883 // Maybe later add stretching support? 884 885 lpDDHELCaps->dwPalCaps = DDPCAPS_8BIT | // Only 8 Bits pals 886 DDPCAPS_ALLOW256 | // But all 256 colors 887 DDPCAPS_VSYNC | // Vsync yet 888 DDPCAPS_PRIMARYSURFACE; // 889 lpDDHELCaps->dwVidMemTotal = 2048*1024; // total video memory 890 lpDDHELCaps->dwVidMemFree = 2048*1024; // total free video memory 891 lpDDHELCaps->dwNumFourCCCodes; // number of supported FOURCC codes 892 lpDDHELCaps->dwRops[DD_ROP_SPACE]; // supported raster ops 893 lpDDHELCaps->dwSVBCaps = DDCAPS_BLT | // We do blitting 894 DDCAPS_BLTCOLORFILL | // We do colorfills 895 DDCAPS_COLORKEY | // We support Colorkeying 896 DDCAPS_COLORKEYHWASSIST; 897 lpDDHELCaps->dwSVBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 898 lpDDHELCaps->dwSVBFXCaps; // . 899 lpDDHELCaps->dwSVBRops[DD_ROP_SPACE]; // . 900 lpDDHELCaps->dwVSBCaps = DDCAPS_BLT | // We do blitting 901 DDCAPS_BLTCOLORFILL | // We do colorfills 902 DDCAPS_COLORKEY | // We support Colorkeying 903 DDCAPS_COLORKEYHWASSIST; 904 lpDDHELCaps->dwVSBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 905 lpDDHELCaps->dwVSBFXCaps; // . 906 lpDDHELCaps->dwVSBRops[DD_ROP_SPACE]; // . 907 lpDDHELCaps->dwSSBCaps = DDCAPS_BLT | // We do blitting 908 DDCAPS_BLTCOLORFILL | // We do colorfills 909 DDCAPS_COLORKEY | // We support Colorkeying 910 DDCAPS_COLORKEYHWASSIST; 911 lpDDHELCaps->dwSSBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 912 lpDDHELCaps->dwSSBFXCaps; // . 913 lpDDHELCaps->dwSSBRops[DD_ROP_SPACE]; // . 914 lpDDHELCaps->dwSVBCaps2 = DDCAPS2_CANRENDERWINDOWED | // Better check for Voodoo ?! 915 DDCAPS2_COPYFOURCC | // yepp memcpy will do this 916 DDCAPS2_WIDESURFACES; // Any size you want! 917 lpDDHELCaps->dwNLVBCaps = DDCAPS_BLT | // We do blitting 918 DDCAPS_BLTCOLORFILL | // We do colorfills 919 DDCAPS_COLORKEY | // We support Colorkeying 920 DDCAPS_COLORKEYHWASSIST; 921 lpDDHELCaps->dwNLVBCaps2 = DDCAPS2_CANRENDERWINDOWED | // Better check for Voodoo ?! 922 DDCAPS2_COPYFOURCC | // yepp memcpy will do this 923 DDCAPS2_WIDESURFACES; // Any size you want! 924 lpDDHELCaps->dwNLVBCKeyCaps = DDCKEYCAPS_SRCBLT; // Only source transparent blitting 925 lpDDHELCaps->dwNLVBFXCaps; // . 926 lpDDHELCaps->dwNLVBRops[DD_ROP_SPACE];// . 848 927 849 928 }
Note:
See TracChangeset
for help on using the changeset viewer.