mirror of
https://github.com/LHY0125/Gobang-Game.git
synced 2026-05-10 02:19:46 +08:00
fix: 修正SDL初始化条件判断和Windows平台编译兼容性
- 将SDL初始化条件从`< 0`改为`!= 0`以正确处理SDL_Init返回值 - 为Windows平台的#pragma comment添加_MSC_VER条件编译,提升跨编译器兼容性 - 统一网络函数参数声明中的指针星号位置,保持代码风格一致
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
#endif
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
Reference in New Issue
Block a user