Changes

Jump to navigation Jump to search
→‎libmpeg2: Remove all the code changes - they aren't needed
* Copy inttypes.h and config.h from the vc++ directory into the libmpeg2 directory
* Copy attributes.h and mpeg2.h from the include directory into the libmpeg2 directory
* Make sure that your project includes these files, and remove the included project object (.obj) files:
** alloc.c
** config.h
** cpu_accel.c
** cpu_state.c
** decode.c
** header.c
</source>
* Open config.h and comment out these lines:
<source lang="C">
#define ACCEL_DETECT
</source>
<source lang="C">
#define ARCH_X86
** Configuration Properties->General, "Configuration type" should be "Static library(.lib)"
** Configuration Properties->C/C++->Code Generation, "Runtime Library" should be "Multi-threaded (/MT)"
 
Now, we'll remove all the MMX optimization references from the files that have been added to the project. Perform the following:
* Open slice.c, replace these lines:
<source lang="C">
extern void (* mpeg2_cpu_state_save) (cpu_state_t * state);
extern void (* mpeg2_cpu_state_restore) (cpu_state_t * state);
</source>
with:
<source lang="C">
void (* mpeg2_cpu_state_save) (cpu_state_t * state) = 0;
void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = 0;
uint32_t mpeg2_detect_accel (uint32_t accel) { return 0; }
void mpeg2_cpu_state_init (uint32_t accel) {}
</source>
After you compile the library, go to its include directory, create a folder "mpeg2dec" in there and copy all files from the include folder in this subfolder. You will end up with 2 directories, "include" and "include\mpeg2dec" with the same files. This is needed, as ScummVM includes files from the "mpeg2dec" directory
1,433

edits

Navigation menu