Merge from amd64-branch:

44036 (sserapion)
Seems that windows cares about manifests and a mismatched processor architecture is not good. Fix amd64 paint in windows.

44772 (sserapion)
Fix warning cast to 'unsigned int' loses precision.

svn path=/trunk/; revision=46419
This commit is contained in:
Timo Kreuzer 2010-03-25 01:59:02 +00:00
commit 7be6452a51
4 changed files with 30 additions and 2 deletions

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
name="DevCpp.Apps.Paint"
processorArchitecture="amd64"
version="1.0.0.0"
type="win32"/>
<description>Paint</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>

View file

@ -42,4 +42,9 @@
// THIS WILL MAKE THE PROGRAM USE THE COMMON CONTROLS // THIS WILL MAKE THE PROGRAM USE THE COMMON CONTROLS
// LIBRARY VERSION 6.0 (IF IT IS AVAILABLE) // LIBRARY VERSION 6.0 (IF IT IS AVAILABLE)
// //
#ifdef _AMD64_
1 24 "paint.exe.amd64.manifest"
#elif _X86_
1 24 "paint.exe.manifest" 1 24 "paint.exe.manifest"
#endif

View file

@ -305,7 +305,7 @@ class audio_wavein
if ( aud_info.bits() == 16 ) if ( aud_info.bits() == 16 )
svalue = ( unsigned int ) abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp )))); svalue = ( unsigned int ) abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp ))));
else if ( aud_info.bits() == 8 ) else if ( aud_info.bits() == 8 )
svalue = (unsigned int)(( unsigned char * ) *(main_buffer + aud_info.bytes_in_samples( nsamp ))); svalue = (unsigned int)(( ptrdiff_t ) *(main_buffer + aud_info.bytes_in_samples( nsamp )));
else else
svalue = 0; svalue = 0;

View file

@ -229,7 +229,7 @@ class audio_waveout
if ( aud_info.bits() == 16 ) if ( aud_info.bits() == 16 )
svalue = ( unsigned int ) abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp )))); svalue = ( unsigned int ) abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp ))));
else if ( aud_info.bits() == 8 ) else if ( aud_info.bits() == 8 )
svalue = (unsigned int)(( unsigned char * ) *(main_buffer + aud_info.bytes_in_samples( nsamp ))); svalue = (unsigned int)(( ptrdiff_t ) *(main_buffer + aud_info.bytes_in_samples( nsamp )));
else else
svalue = 0; svalue = 0;