Commit 9f04d40e authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix linux compatibility

parent 6361c05b
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#ifndef WIN32 #ifndef WIN32
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#include <unistd.h>
#endif #endif
const unsigned short PRO_VERSION = 0x1320; const unsigned short PRO_VERSION = 0x1320;
...@@ -37,7 +38,11 @@ void Game::MainServerLoop(int bDuel_mode) { ...@@ -37,7 +38,11 @@ void Game::MainServerLoop(int bDuel_mode) {
NetServer::StartServer(aServerPort); NetServer::StartServer(aServerPort);
NetServer::Initduel(bDuel_mode); NetServer::Initduel(bDuel_mode);
while(NetServer::net_evbase) { while(NetServer::net_evbase) {
#ifdef WIN32
Sleep(200); Sleep(200);
#else
usleep(200000);
#endif
} }
} }
......
...@@ -68,7 +68,7 @@ class Game { ...@@ -68,7 +68,7 @@ class Game {
public: public:
bool Initialize(); bool Initialize();
void MainLoop(); void MainLoop();
void Game::MainServerLoop(int bDuel_mode); void MainServerLoop(int bDuel_mode);
void BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 right, f32 bottom, f32 top, f32 znear, f32 zfar); void BuildProjectionMatrix(irr::core::matrix4& mProjection, f32 left, f32 right, f32 bottom, f32 top, f32 znear, f32 zfar);
void SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gui::CGUITTFont* font, wchar_t* text); void SetStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, irr::gui::CGUITTFont* font, wchar_t* text);
void RefreshDeck(irr::gui::IGUIComboBox* cbDeck); void RefreshDeck(irr::gui::IGUIComboBox* cbDeck);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment