mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Removed some SDL access from non-SDL code
This commit is contained in:
@@ -60,8 +60,6 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <SDL_events.h>
|
||||
|
||||
template<typename T> class CApplyOnLobby;
|
||||
|
||||
const std::string CServerHandler::localhostAddress{"127.0.0.1"};
|
||||
@@ -655,14 +653,10 @@ void CServerHandler::endGameplay(bool closeConnection, bool restart)
|
||||
|
||||
void CServerHandler::startCampaignScenario(std::shared_ptr<CCampaignState> cs)
|
||||
{
|
||||
SDL_Event event;
|
||||
event.type = SDL_USEREVENT;
|
||||
event.user.code = static_cast<int32_t>(EUserEvent::CAMPAIGN_START_SCENARIO);
|
||||
if(cs)
|
||||
event.user.data1 = CMemorySerializer::deepCopy(*cs.get()).release();
|
||||
GH.pushUserEvent(EUserEvent::CAMPAIGN_START_SCENARIO, CMemorySerializer::deepCopy(*cs.get()).release());
|
||||
else
|
||||
event.user.data1 = CMemorySerializer::deepCopy(*si->campState.get()).release();
|
||||
SDL_PushEvent(&event);
|
||||
GH.pushUserEvent(EUserEvent::CAMPAIGN_START_SCENARIO, CMemorySerializer::deepCopy(*si->campState.get()).release());
|
||||
}
|
||||
|
||||
void CServerHandler::showServerError(std::string txt)
|
||||
|
||||
Reference in New Issue
Block a user