mirror of
https://github.com/blueshogun96/Cxbx.git
synced 2024-05-17 04:10:32 -04:00
Bug fix for bad .exe headers in x64 mode
This commit is contained in:
parent
416967aed4
commit
e61e7f5829
|
@ -17,7 +17,7 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -329,6 +329,21 @@ void Exe::Export(const char *x_szExeFilename)
|
|||
}
|
||||
}
|
||||
|
||||
// Write correct SizeOfImage
|
||||
{
|
||||
printf( "Exe::Export: Writing Image Size..." );
|
||||
int CurrentSize = ftell( ExeFile );
|
||||
|
||||
// Seek to offset of File Size
|
||||
fseek( ExeFile, 0x108, SEEK_SET );
|
||||
// Write calculated size
|
||||
fwrite( &CurrentSize, sizeof( int ), 1, ExeFile );
|
||||
|
||||
printf( "OK\n" );
|
||||
}
|
||||
|
||||
fflush( ExeFile );
|
||||
|
||||
cleanup:
|
||||
|
||||
if(GetError() != 0)
|
||||
|
|
|
@ -74,9 +74,9 @@ typedef signed long sint32;
|
|||
#define _DEBUG_ALLOC
|
||||
#endif
|
||||
/*! define this to trace intercepted function calls */
|
||||
#ifdef _DEBUG
|
||||
//#ifdef _DEBUG
|
||||
#define _DEBUG_TRACE
|
||||
#endif
|
||||
//#endif
|
||||
/*! define this to trace warnings */
|
||||
#define _DEBUG_WARNINGS
|
||||
/*! define this to trace vertex shader constants */
|
||||
|
|
Loading…
Reference in a new issue