现在的位置: 首页 > 综合 > 正文

如何避免VS2005下的d3d9types.h(1385) warning C4819

2013年12月13日 ⁄ 综合 ⁄ 共 904字 ⁄ 字号 评论关闭

用VS2005+DirectX9 SDK(手头测试过的是2004年10月的DirectX SDK和2006年4月的DirectX SDK)编译游戏会出现以下warning:


d:/microsoft directx 9.0 sdk (october 2004)/include/d3d9types.h(1385) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss


要修正这个问题,不必要存为UTF8的文件,而是搜索_D3DDEVINFO_VCACHE,然后会看到:

 

typedef struct _D3DDEVINFO_VCACHE {
    DWORD   Pattern;                    
/* bit pattern, return value must be FOUR_CC(慍? 慉? 慍? 慔? */
    DWORD   OptMethod;                  
/* optimization method 0 means longest strips, 1 means vertex cache based */
    DWORD   CacheSize;                  
/* cache size to optimize for  (only required if type is 1) */
    DWORD   MagicNumber;                
/* used to determine when to restart strips (only required if type is 1)*/
}
 D3DDEVINFO_VCACHE, *LPD3DDEVINFO_VCACHE;

那四个乱码的去掉就可以了

 

参考了http://gamep.mmoh.jp/e39255.html

抱歉!评论已关闭.