Skip to content

Commit

Permalink
Disable network for platforms with no tcp stack
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed May 12, 2019
1 parent 2df39ec commit c998dfd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ add_executable(devilutionx
SourceX/dvlnet/packet.cpp
SourceX/dvlnet/base.cpp
SourceX/dvlnet/frame_queue.cpp
SourceX/dvlnet/tcp_client.cpp
SourceX/dvlnet/tcp_server.cpp
SourceX/dvlnet/udp_p2p.cpp
SourceX/DiabloUI/credits.cpp
SourceX/DiabloUI/diabloui.cpp
SourceX/DiabloUI/dialogs.cpp
Expand All @@ -204,7 +201,6 @@ add_executable(devilutionx
target_include_directories(devilution PUBLIC Source SourceS)
target_include_directories(devilutionx PRIVATE
SourceX
3rdParty/asio/include
3rdParty/Radon/Radon/include
3rdParty/libsmacker)

Expand All @@ -226,7 +222,6 @@ target_compile_definitions(devilution PUBLIC
"$<$<BOOL:${DEBUG}>:_DEBUG>"
# Skip fades and other fluff
"$<$<BOOL:${FASTER}>:FASTER>")
target_compile_definitions(devilutionx PRIVATE ASIO_STANDALONE)

if(ASAN)
target_compile_options(devilution PUBLIC -fsanitize=address -fsanitize-recover=address)
Expand Down
12 changes: 1 addition & 11 deletions SourceX/dvlnet/abstract_net.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "dvlnet/abstract_net.h"

#include "stubs.h"
#include "dvlnet/tcp_client.h"
#include "dvlnet/udp_p2p.h"
#include "dvlnet/loopback.h"

namespace dvl {
Expand All @@ -14,15 +12,7 @@ abstract_net::~abstract_net()

std::unique_ptr<abstract_net> abstract_net::make_net(provider_t provider)
{
if (provider == 'TCPN') {
return std::make_unique<tcp_client>();
} else if (provider == 'UDPN') {
return std::make_unique<udp_p2p>();
} else if (provider == 'SCBL' || provider == 0) {
return std::make_unique<loopback>();
} else {
ABORT();
}
return std::make_unique<loopback>();
}

} // namespace net
Expand Down

0 comments on commit c998dfd

Please sign in to comment.