Merge from amd64-branch:
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 25 Mar 2010 01:59:02 +0000 (01:59 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 25 Mar 2010 01:59:02 +0000 (01:59 +0000)
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

reactos/base/applications/paint/paint.exe.amd64.manifest [new file with mode: 0644]
reactos/base/applications/paint/rsrc.rc
reactos/base/applications/sndrec32/audio_wavein.hpp
reactos/base/applications/sndrec32/audio_waveout.hpp

diff --git a/reactos/base/applications/paint/paint.exe.amd64.manifest b/reactos/base/applications/paint/paint.exe.amd64.manifest
new file mode 100644 (file)
index 0000000..1e96c9c
--- /dev/null
@@ -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>
index 49b981a..a1e776d 100644 (file)
@@ -42,4 +42,9 @@
 // THIS WILL MAKE THE PROGRAM USE THE COMMON CONTROLS
 // LIBRARY VERSION 6.0 (IF IT IS AVAILABLE)
 //
+#ifdef _AMD64_
+1 24 "paint.exe.amd64.manifest"
+#elif _X86_
 1 24 "paint.exe.manifest"
+#endif
+
index 0288ea6..7f9285b 100644 (file)
@@ -305,7 +305,7 @@ class audio_wavein
             if ( aud_info.bits() == 16 )
                 svalue = ( unsigned int )  abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp ))));
             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 
                 svalue = 0;
index a36518d..0e22afd 100644 (file)
@@ -229,7 +229,7 @@ class audio_waveout
             if ( aud_info.bits() == 16 )
                 svalue = ( unsigned int )  abs( *(( short * ) (main_buffer + aud_info.bytes_in_samples( nsamp ))));
             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 
                 svalue = 0;