[vlc-devel] commit: Win32: assume the OS support what the processor supports ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Jan 12 23:20:01 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 13 00:18:27 2010 +0200| [03e38b504cbdcc8ac8c9dd1cf53ec4c5662cd59e] | committer: Rémi Denis-Courmont
Win32: assume the OS support what the processor supports
We cannot use SIGILL, so we have to trust CPUID.
Maybe there is a Win32 API to query the kernel support?
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=03e38b504cbdcc8ac8c9dd1cf53ec4c5662cd59e
---
src/misc/cpu.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/misc/cpu.c b/src/misc/cpu.c
index a11a628..b09debb 100644
--- a/src/misc/cpu.c
+++ b/src/misc/cpu.c
@@ -70,7 +70,7 @@ static bool check_OS_capability( const char *psz_capability, pid_t pid )
return false;
}
-# define check_capability(name, flag, code) \
+# define check_capability(name, flag, code) \
do { \
pid_t pid = fork(); \
if( pid == 0 ) \
@@ -84,7 +84,10 @@ static bool check_OS_capability( const char *psz_capability, pid_t pid )
} while(0)
# else /* WIN32 */
-# define check_capability(name, flag, code) (void)0
+# define check_capability(name, flag, code) \
+ do { \
+ i_capabilities |= (flag); \
+ } while(0)
# endif
#endif
More information about the vlc-devel
mailing list