Commit fcba07f7 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Buildfix for MSVC

parent 14cdd334
Pipeline #56214 passed with stages
in 21 minutes and 16 seconds
......@@ -666,7 +666,9 @@ INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/include")
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib")
BIN := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin")
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3" -v "Install Dir" | grep -o '[A-Z]:\\.*')
#WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3" -v "Install Dir" | grep -o '[A-Z]:\\.*')
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include")
WindowsSDKAtlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\atl")
......
......@@ -72,12 +72,12 @@ void ecc_clear(uint8_t *sector);
INLINE FUNCTIONS
***************************************************************************/
static inline uint32_t msf_to_lba(uint32_t msf)
INLINE uint32_t msf_to_lba(uint32_t msf)
{
return ( ((msf&0x00ff0000)>>16) * 60 * 75) + (((msf&0x0000ff00)>>8) * 75) + ((msf&0x000000ff)>>0);
}
static inline uint32_t lba_to_msf(uint32_t lba)
INLINE uint32_t lba_to_msf(uint32_t lba)
{
uint8_t m, s, f;
......@@ -96,7 +96,7 @@ static inline uint32_t lba_to_msf(uint32_t lba)
* Angelo also says PCE tracks often start playing at the
* wrong address.. related?
**/
static inline uint32_t lba_to_msf_alt(int lba)
INLINE uint32_t lba_to_msf_alt(int lba)
{
uint32_t ret = 0;
......
......@@ -304,7 +304,7 @@ static const uint16_t qoffsets[ECC_Q_NUM_BYTES][ECC_Q_COMP] =
*-------------------------------------------------
*/
static inline uint8_t ecc_source_byte(const uint8_t *sector, uint32_t offset)
INLINE uint8_t ecc_source_byte(const uint8_t *sector, uint32_t offset)
{
/* in mode 2 always treat these as 0 bytes */
return (sector[MODE_OFFSET] == 2 && offset < 4) ? 0x00 : sector[SYNC_OFFSET + SYNC_NUM_BYTES + offset];
......
......@@ -944,7 +944,7 @@ static const codec_interface codec_interfaces[] =
the data stream in bigendian order
-------------------------------------------------*/
static inline UINT64 get_bigendian_uint64(const UINT8 *base)
INLINE UINT64 get_bigendian_uint64(const UINT8 *base)
{
return ((UINT64)base[0] << 56) | ((UINT64)base[1] << 48) | ((UINT64)base[2] << 40) | ((UINT64)base[3] << 32) |
((UINT64)base[4] << 24) | ((UINT64)base[5] << 16) | ((UINT64)base[6] << 8) | (UINT64)base[7];
......@@ -955,7 +955,7 @@ static inline UINT64 get_bigendian_uint64(const UINT8 *base)
the data stream in bigendian order
-------------------------------------------------*/
static inline void put_bigendian_uint64(UINT8 *base, UINT64 value)
INLINE void put_bigendian_uint64(UINT8 *base, UINT64 value)
{
base[0] = value >> 56;
base[1] = value >> 48;
......@@ -972,7 +972,7 @@ static inline void put_bigendian_uint64(UINT8 *base, UINT64 value)
the data stream in bigendian order
-------------------------------------------------*/
static inline UINT64 get_bigendian_uint48(const UINT8 *base)
INLINE UINT64 get_bigendian_uint48(const UINT8 *base)
{
return ((UINT64)base[0] << 40) | ((UINT64)base[1] << 32) |
((UINT64)base[2] << 24) | ((UINT64)base[3] << 16) | ((UINT64)base[4] << 8) | (UINT64)base[5];
......@@ -983,7 +983,7 @@ static inline UINT64 get_bigendian_uint48(const UINT8 *base)
the data stream in bigendian order
-------------------------------------------------*/
static inline void put_bigendian_uint48(UINT8 *base, UINT64 value)
INLINE void put_bigendian_uint48(UINT8 *base, UINT64 value)
{
value &= 0xffffffffffff;
base[0] = value >> 40;
......@@ -998,7 +998,7 @@ static inline void put_bigendian_uint48(UINT8 *base, UINT64 value)
the data stream in bigendian order
-------------------------------------------------*/
static inline UINT32 get_bigendian_uint32(const UINT8 *base)
INLINE UINT32 get_bigendian_uint32(const UINT8 *base)
{
return (base[0] << 24) | (base[1] << 16) | (base[2] << 8) | base[3];
}
......@@ -1008,7 +1008,7 @@ static inline UINT32 get_bigendian_uint32(const UINT8 *base)
the data stream in bigendian order
-------------------------------------------------*/
static inline void put_bigendian_uint32(UINT8 *base, UINT32 value)
INLINE void put_bigendian_uint32(UINT8 *base, UINT32 value)
{
base[0] = value >> 24;
base[1] = value >> 16;
......@@ -1021,7 +1021,7 @@ static inline void put_bigendian_uint32(UINT8 *base, UINT32 value)
the data stream in bigendian order
-------------------------------------------------*/
static inline void put_bigendian_uint24(UINT8 *base, UINT32 value)
INLINE void put_bigendian_uint24(UINT8 *base, UINT32 value)
{
value &= 0xffffff;
base[0] = value >> 16;
......@@ -1034,7 +1034,7 @@ static inline void put_bigendian_uint24(UINT8 *base, UINT32 value)
the data stream in bigendian order
-------------------------------------------------*/
static inline UINT32 get_bigendian_uint24(const UINT8 *base)
INLINE UINT32 get_bigendian_uint24(const UINT8 *base)
{
return (base[0] << 16) | (base[1] << 8) | base[2];
}
......@@ -1044,7 +1044,7 @@ static inline UINT32 get_bigendian_uint24(const UINT8 *base)
the data stream in bigendian order
-------------------------------------------------*/
static inline UINT16 get_bigendian_uint16(const UINT8 *base)
INLINE UINT16 get_bigendian_uint16(const UINT8 *base)
{
return (base[0] << 8) | base[1];
}
......@@ -1054,7 +1054,7 @@ static inline UINT16 get_bigendian_uint16(const UINT8 *base)
the data stream in bigendian order
-------------------------------------------------*/
static inline void put_bigendian_uint16(UINT8 *base, UINT16 value)
INLINE void put_bigendian_uint16(UINT8 *base, UINT16 value)
{
base[0] = value >> 8;
base[1] = value;
......@@ -1065,7 +1065,7 @@ static inline void put_bigendian_uint16(UINT8 *base, UINT16 value)
entry from the datastream
-------------------------------------------------*/
static inline void map_extract(const UINT8 *base, map_entry *entry)
INLINE void map_extract(const UINT8 *base, map_entry *entry)
{
entry->offset = get_bigendian_uint64(&base[0]);
entry->crc = get_bigendian_uint32(&base[8]);
......@@ -1078,7 +1078,7 @@ static inline void map_extract(const UINT8 *base, map_entry *entry)
entry to the datastream
-------------------------------------------------*/
static inline void map_assemble(UINT8 *base, map_entry *entry)
INLINE void map_assemble(UINT8 *base, map_entry *entry)
{
put_bigendian_uint64(&base[0], entry->offset);
put_bigendian_uint32(&base[8], entry->crc);
......@@ -1090,7 +1090,7 @@ static inline void map_assemble(UINT8 *base, map_entry *entry)
/*-------------------------------------------------
map_size_v5 - calculate CHDv5 map size
-------------------------------------------------*/
static inline int map_size_v5(chd_header* header)
INLINE int map_size_v5(chd_header* header)
{
return header->hunkcount * header->mapentrybytes;
}
......@@ -1149,7 +1149,7 @@ uint16_t crc16(const void *data, uint32_t length)
/*-------------------------------------------------
compressed - test if CHD file is compressed
+-------------------------------------------------*/
static inline int chd_compressed(chd_header* header) {
INLINE int chd_compressed(chd_header* header) {
return header->compression[0] != CHD_CODEC_NONE;
}
......@@ -1319,7 +1319,7 @@ static chd_error decompress_v5_map(chd_file* chd, chd_header* header)
entry in old format from the datastream
-------------------------------------------------*/
static inline void map_extract_old(const UINT8 *base, map_entry *entry, UINT32 hunkbytes)
INLINE void map_extract_old(const UINT8 *base, map_entry *entry, UINT32 hunkbytes)
{
entry->offset = get_bigendian_uint64(&base[0]);
entry->crc = 0;
......@@ -2268,8 +2268,9 @@ static chd_error hunk_read_into_memory(chd_file *chd, UINT32 hunknum, UINT8 *des
{
blockoffs = (uint64_t)get_bigendian_uint32(rawmap) * (uint64_t)chd->header.hunkbytes;
if (blockoffs != 0) {
int result;
core_fseek(chd->file, blockoffs, SEEK_SET);
int result = core_fread(chd->file, dest, chd->header.hunkbytes);
result = core_fread(chd->file, dest, chd->header.hunkbytes);
/* TODO
else if (m_parent_missing)
throw CHDERR_REQUIRES_PARENT; */
......
......@@ -127,8 +127,13 @@ int flac_decoder_reset(flac_decoder* decoder, uint32_t sample_rate, uint8_t num_
*-------------------------------------------------
*/
#define BUFFER 2352 /* bytes per CD audio sector */
int flac_decoder_decode_interleaved(flac_decoder* decoder, int16_t *samples, uint32_t num_samples, int swap_endian)
{
int16_t buffer[BUFFER];
uint32_t buf_samples;
/* configure the uncompressed buffer */
memset(decoder->uncompressed_start, 0, sizeof(decoder->uncompressed_start));
decoder->uncompressed_start[0] = samples;
......@@ -136,9 +141,7 @@ int flac_decoder_decode_interleaved(flac_decoder* decoder, int16_t *samples, uin
decoder->uncompressed_length = num_samples;
decoder->uncompressed_swap = swap_endian;
#define BUFFER 2352 /* bytes per CD audio sector */
int16_t buffer[BUFFER];
uint32_t buf_samples = BUFFER / channels(decoder);
buf_samples = BUFFER / channels(decoder);
/* loop until we get everything we want */
while (decoder->uncompressed_offset < decoder->uncompressed_length) {
uint32_t frames = (num_samples < buf_samples ? num_samples : buf_samples);
......
......@@ -3009,7 +3009,7 @@ bool retro_load_game(const struct retro_game_info *info)
#else
char slash = '/';
#endif
const struct retro_game_info_ext *info_ext = NULL;
struct retro_game_info_ext *info_ext = NULL;
char content_path[256];
char content_ext[8];
......@@ -3431,9 +3431,9 @@ void retro_run(void)
int result = -1;
int do_skip = 0;
bool updated = false;
is_running = true;
int vwoffset = 0;
int bmdoffset = 0;
is_running = true;
#ifdef HAVE_OVERCLOCK
/* update overclock delay */
......@@ -3565,13 +3565,9 @@ void retro_run(void)
{
bmdoffset = 16;
if (config.left_border == 1)
{
vwoffset = 8;
}
else
{
vwoffset = 16;
}
}
if (!do_skip)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment