Fixed Xbox 360 crash
This commit is contained in:
@@ -74,7 +74,7 @@ BlockRegionUpdatePacket::BlockRegionUpdatePacket(int x, int y, int z, int xs, in
|
||||
unsigned char *ucTemp = new unsigned char[(256 * 16 * 16 * 5)/2];
|
||||
unsigned int inputSize = (256 * 16 * 16 * 5)/2;
|
||||
|
||||
Compression::getCompression()->CompressLZXRLE(ucTemp, &inputSize, rawBuffer.data, (unsigned int) rawBuffer.length);
|
||||
Compression::getCompression()->CompressRLE(ucTemp, &inputSize, rawBuffer.data, (unsigned int) rawBuffer.length);
|
||||
//app.DebugPrintf("Chunk (%d,%d) compressed from %d to size %d\n", x>>4, z>>4, rawBuffer.length, inputSize);
|
||||
unsigned char *ucTemp2 = new unsigned char[inputSize];
|
||||
memcpy(ucTemp2,ucTemp,inputSize);
|
||||
@@ -120,7 +120,7 @@ void BlockRegionUpdatePacket::read(DataInputStream *dis) //throws IOException
|
||||
|
||||
if( success )
|
||||
{
|
||||
Compression::getCompression()->DecompressLZXRLE( buffer.data, &outputSize, compressedBuffer.data, size);
|
||||
Compression::getCompression()->DecompressRLE( buffer.data, &outputSize, compressedBuffer.data, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -341,7 +341,7 @@ bool Connection::readTick()
|
||||
// printf("Con:0x%x readTick close EOS\n",this);
|
||||
|
||||
// 4J Stu - Remove this line
|
||||
// Fix for #10410 - UI: If the player is removed from a splitscreened host’s game, the next game that player joins will produce a message stating that the host has left.
|
||||
// Fix for #10410 - UI: If the player is removed from a splitscreened hosts game, the next game that player joins will produce a message stating that the host has left.
|
||||
//close(DisconnectPacket::eDisconnect_EndOfStream);
|
||||
}
|
||||
|
||||
@@ -666,7 +666,7 @@ int Connection::runClose(void* lpParam)
|
||||
|
||||
//try {
|
||||
|
||||
Sleep(2000);
|
||||
Sleep(500);
|
||||
if (con->running)
|
||||
{
|
||||
// 4J TODO writeThread.interrupt();
|
||||
@@ -690,7 +690,7 @@ int Connection::runSendAndQuit(void* lpParam)
|
||||
|
||||
//try {
|
||||
|
||||
Sleep(2000);
|
||||
Sleep(500);
|
||||
if (con->running)
|
||||
{
|
||||
// 4J TODO writeThread.interrupt();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="ContentPackage_NO_TU|Durango">
|
||||
@@ -274,6 +274,7 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "compression.h"
|
||||
#if defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WIN64
|
||||
#if defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WIN64 || defined _XBOX
|
||||
#include "..\Minecraft.Client\Common\zlib\zlib.h"
|
||||
#endif
|
||||
|
||||
@@ -299,7 +299,7 @@ HRESULT Compression::DecompressRLE(void *pDestination, unsigned int *pDestSize,
|
||||
|
||||
HRESULT Compression::Compress(void *pDestination, unsigned int *pDestSize, void *pSource, unsigned int SrcSize)
|
||||
{
|
||||
// Using zlib for x64 compression - 360 is using native 360 compression and PS3 a stubbed non-compressing version of this
|
||||
// Using zlib for x64 compression - 360 is using native 64 compression and PS3 a stubbed non-compressing version of this
|
||||
#if defined __ORBIS__ || defined _DURANGO || defined _WIN64 || defined __PSVITA__
|
||||
SIZE_T destSize = (SIZE_T)(*pDestSize);
|
||||
int res = ::compress((Bytef *)pDestination, (uLongf *)&destSize, (Bytef *)pSource, SrcSize);
|
||||
@@ -327,7 +327,7 @@ HRESULT Compression::Decompress(void *pDestination, unsigned int *pDestSize, voi
|
||||
return DecompressWithType(pDestination, pDestSize, pSource, SrcSize);
|
||||
}
|
||||
|
||||
// Using zlib for x64 compression - 360 is using native 360 compression and PS3 a stubbed non-compressing version of this
|
||||
// Using zlib for x64 and 360 compression - 360 is using native 360 compression and PS3 a stubbed non-compressing version of this
|
||||
#if defined __ORBIS__ || defined _DURANGO || defined _WIN64 || defined __PSVITA__
|
||||
SIZE_T destSize = (SIZE_T)(*pDestSize);
|
||||
int res = ::uncompress((Bytef *)pDestination, (uLongf *)&destSize, (Bytef *)pSource, SrcSize);
|
||||
@@ -406,7 +406,7 @@ HRESULT Compression::DecompressWithType(void *pDestination, unsigned int *pDestS
|
||||
}
|
||||
break;
|
||||
case eCompressionType_ZLIBRLE:
|
||||
#if (defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WIN64)
|
||||
#if (defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WIN64 || defined _XBOX)
|
||||
if (pDestination != NULL)
|
||||
return ::uncompress((PBYTE)pDestination, (unsigned long *) pDestSize, (PBYTE) pSource, SrcSize); // Decompress
|
||||
else break; // Cannot decompress when destination is NULL
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#ifdef _XBOX
|
||||
#ifndef _DISABLE_XBLIVE
|
||||
#define _DISABLE_XBLIVE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __PS3__
|
||||
#else
|
||||
#define AUTO_VAR(_var, _val) auto _var = _val
|
||||
|
||||
Reference in New Issue
Block a user