44
55GameEventQueue::GameEventQueue () :
66#ifdef CONFIG_PROFILE_LOCKS
7- pcs (new Lock(MUTEX_PROFILE_ID(GameEventQueue)))
7+ pcs (new Lock(MUTEX_PROFILE_ID(GameEventQueue)))
88#else
9- pcs (new Lock)
9+ pcs (new Lock)
1010#endif // CONFIG_PROFILE_LOCKS
1111{
1212 unused.reserve (128 );
@@ -38,9 +38,7 @@ GameEvent* GameEventQueue::Create()
3838#ifdef _DEBUG
3939// Msg ("* GameEventQueue::Create - ready %d, unused %d", ready.size(), unused.size());
4040#endif
41- #ifndef LINUX // FIXME!!!
42- LastTimeCreate = GetTickCount ();
43- #endif
41+ LastTimeCreate = SDL_GetTicks ();
4442 // ---------------------------------------------
4543 }
4644 else
@@ -74,16 +72,14 @@ GameEvent* GameEventQueue::Create(NET_Packet& P, u16 type, u32 time, ClientID cl
7472 pcs->Enter ();
7573 if (unused.empty ())
7674 {
77- #ifndef LINUX // FIXME!!!
7875 ready.push_back (new GameEvent ());
7976 ge = ready.back ();
8077// ---------------------------------------------
8178#ifdef _DEBUG
8279// Msg ("* GameEventQueue::Create - ready %d, unused %d", ready.size(), unused.size());
8380#endif
84- LastTimeCreate = GetTickCount ();
81+ LastTimeCreate = SDL_GetTicks ();
8582 // ---------------------------------------------
86- #endif
8783 }
8884 else
8985 {
@@ -108,8 +104,7 @@ GameEvent* GameEventQueue::Retreive()
108104 // ---------------------------------------------
109105 else
110106 {
111- #ifndef LINUX // FIXME!!
112- u32 tmp_time = GetTickCount () - 60000 ;
107+ u32 tmp_time = SDL_GetTicks () - 60000 ;
113108 u32 size = unused.size ();
114109 if ((LastTimeCreate < tmp_time) && (size > 32 ))
115110 {
@@ -119,7 +114,6 @@ GameEvent* GameEventQueue::Retreive()
119114// Msg ("GameEventQueue::Retreive - ready %d, unused %d", ready.size(), unused.size());
120115#endif
121116 }
122- #endif
123117 }
124118 // ---------------------------------------------
125119 pcs->Leave ();
@@ -131,8 +125,7 @@ void GameEventQueue::Release()
131125 pcs->Enter ();
132126 R_ASSERT (!ready.empty ());
133127 // ---------------------------------------------
134- #ifndef LINUX // FIXME!!!
135- u32 tmp_time = GetTickCount () - 60000 ;
128+ u32 tmp_time = SDL_GetTicks () - 60000 ;
136129 u32 size = unused.size ();
137130 if ((LastTimeCreate < tmp_time) && (size > 32 ))
138131 {
@@ -143,7 +136,6 @@ void GameEventQueue::Release()
143136 }
144137 else
145138 unused.push_back (ready.front ());
146- #endif
147139 // ---------------------------------------------
148140 ready.pop_front ();
149141 pcs->Leave ();
@@ -183,8 +175,7 @@ u32 GameEventQueue::EraseEvents(event_predicate to_del)
183175 while (need_to_erase != ready.end ())
184176 {
185177 // -----
186- #ifndef LINUX // FIXME!!!
187- u32 tmp_time = GetTickCount () - 60000 ;
178+ u32 tmp_time = SDL_GetTicks () - 60000 ;
188179 u32 size = unused.size ();
189180 if ((LastTimeCreate < tmp_time) && (size > 32 ))
190181 {
@@ -197,7 +188,6 @@ u32 GameEventQueue::EraseEvents(event_predicate to_del)
197188 {
198189 unused.push_back (*need_to_erase);
199190 }
200- #endif
201191// -----
202192#ifdef DEBUG
203193 Msg (" ! GameEventQueue::EraseEvents - destroying event type[%d], sender[0x%08x]" , (*need_to_erase)->type ,
0 commit comments