mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
C++03 Support & Partial Xbox 360 Support (#37)
* WIP C++03 + Xbox 360 Support * math.h & _USE_MATH_DEFINES on Level.hpp Updated Xenon vcxproj file for new file structure. * * Fix bad GUI scale setup. * * Gui: Use ratios instead of hardcoded sub-1 floating point values, to make the mechanism more clear. * Add Direct Connect Button and Screen (#30) * Add Direct Connect Button and Screen * Remove accidental extra build directories for wasm * Add DirectConnectScreen.cpp to the CMake * Use Hungarian coding style notation * * Fix errors caused by #30 * * Improve the Chat Screen * * Improve the DirectConnectScreen, among other things. * * Update the game title once again. * * Add build-wasm.bat. * * Add info about compiling for wasm * * Fix send to specific GUID actually broadcasting to everyone * * Add command manager. * * Add writeable configuration. * * Allow dynamic screen size change on windows * * Allow the same thing on the emscripten version. * WIP C++03 + Xbox 360 Support * Fixed a possible merging issue that broke RakNet? * Additional Xbox 360 compatability fixes --------- Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com> Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com> Co-authored-by: ts <124226059+uniformization@users.noreply.github.com>
This commit is contained in:
15
thirdparty/raknet/SocketLayer.cpp
vendored
15
thirdparty/raknet/SocketLayer.cpp
vendored
@@ -155,8 +155,7 @@ void SocketLayer::SetSocketOptions( __UDPSOCKET__ listenSocket, bool blockingSoc
|
||||
sock_opt=1;
|
||||
if ( setsockopt__(listenSocket, SOL_SOCKET, SO_BROADCAST, ( char * ) & sock_opt, sizeof( sock_opt ) ) == -1 )
|
||||
{
|
||||
#if defined(_WIN32) && defined(_DEBUG)
|
||||
#if !defined(WINDOWS_PHONE_8)
|
||||
#if defined(_WINPC) && defined(_DEBUG)
|
||||
DWORD dwIOError = GetLastError();
|
||||
// On Vista, can get WSAEACCESS (10013)
|
||||
// See http://support.microsoft.com/kb/819124
|
||||
@@ -170,7 +169,6 @@ void SocketLayer::SetSocketOptions( __UDPSOCKET__ listenSocket, bool blockingSoc
|
||||
RAKNET_DEBUG_PRINTF( "setsockopt__(SO_BROADCAST) failed:Error code - %d\n%s", dwIOError, messageBuffer );
|
||||
//Free the buffer.
|
||||
LocalFree( messageBuffer );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -190,7 +188,7 @@ RakNet::RakString SocketLayer::GetSubNetForSocketAndIp(__UDPSOCKET__ inSock, Rak
|
||||
|
||||
|
||||
|
||||
#if defined(WINDOWS_STORE_RT)
|
||||
#if defined(WINDOWS_STORE_RT) || defined(_XBOX)
|
||||
RakAssert("Not yet supported" && 0);
|
||||
return "";
|
||||
#elif defined(_WIN32)
|
||||
@@ -356,12 +354,14 @@ void GetMyIP_WinRT( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] )
|
||||
#else
|
||||
void GetMyIP_Win32( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] )
|
||||
{
|
||||
#ifdef _WINPC
|
||||
|
||||
int idx=0;
|
||||
idx=0;
|
||||
char ac[ 80 ];
|
||||
if ( gethostname( ac, sizeof( ac ) ) == -1 )
|
||||
{
|
||||
#if defined(_WIN32) && !defined(WINDOWS_PHONE_8)
|
||||
#if defined(_WINPC)
|
||||
DWORD dwIOError = GetLastError();
|
||||
LPVOID messageBuffer;
|
||||
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
@@ -403,7 +403,7 @@ void GetMyIP_Win32( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] )
|
||||
|
||||
if ( phe == 0 )
|
||||
{
|
||||
#if defined(_WIN32) && !defined(WINDOWS_PHONE_8)
|
||||
#if defined(_WINPC)
|
||||
DWORD dwIOError = GetLastError();
|
||||
LPVOID messageBuffer;
|
||||
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
@@ -432,6 +432,7 @@ void GetMyIP_Win32( SystemAddress addresses[MAXIMUM_NUMBER_OF_INTERNAL_IDS] )
|
||||
addresses[idx]=UNASSIGNED_SYSTEM_ADDRESS;
|
||||
idx++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -480,7 +481,7 @@ void SocketLayer::GetSystemAddress_Old ( __UDPSOCKET__ s, SystemAddress *systemA
|
||||
socklen_t len = sizeof(sa);
|
||||
if (getsockname__(s, (sockaddr*)&sa, &len)!=0)
|
||||
{
|
||||
#if defined(_WIN32) && defined(_DEBUG) && !defined(WINDOWS_PHONE_8)
|
||||
#if defined(_WINPC) && defined(_DEBUG)
|
||||
DWORD dwIOError = GetLastError();
|
||||
LPVOID messageBuffer;
|
||||
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
|
||||
Reference in New Issue
Block a user