libretro: Use stdint.h instead in most cases

This commit is contained in:
retro-wertz 2018-06-05 00:14:06 +08:00
parent 1f20ba81ad
commit 3411aa33a4
11 changed files with 39 additions and 2 deletions

View File

@ -1,7 +1,11 @@
#ifndef SYSTEM_H #ifndef SYSTEM_H
#define SYSTEM_H #define SYSTEM_H
#ifndef __LIBRETRO__
#include "common/cstdint.h" #include "common/cstdint.h"
#else
#include <stdint.h>
#endif
#ifndef __LIBRETRO__ #ifndef __LIBRETRO__
#include <zlib.h> #include <zlib.h>

View File

@ -1,7 +1,11 @@
#ifndef PATCH_H #ifndef PATCH_H
#define PATCH_H #define PATCH_H
#ifndef __LIBRETRO__
#include "cstdint.h" #include "cstdint.h"
#else
#include <stdint.h>
#endif
bool applyPatch(const char *patchname, uint8_t **rom, int *size); bool applyPatch(const char *patchname, uint8_t **rom, int *size);

View File

@ -1,7 +1,11 @@
#ifndef PORT_H #ifndef PORT_H
#define PORT_H #define PORT_H
#ifndef __LIBRETRO__
#include "cstdint.h" #include "cstdint.h"
#else
#include <stdint.h>
#endif
#ifdef __CELLOS_LV2__ #ifdef __CELLOS_LV2__
/* PlayStation3 */ /* PlayStation3 */

View File

@ -1,7 +1,11 @@
#ifndef VBA_BKS_H #ifndef VBA_BKS_H
#define VBA_BKS_H #define VBA_BKS_H
#ifndef __LIBRETRO__
#include "../common/cstdint.h" #include "../common/cstdint.h"
#else
#include <stdint.h>
#endif
#define readWord(addr) \ #define readWord(addr) \
((map[(addr) >> 24].address[(addr)&map[(addr) >> 24].mask]) + ((map[(addr + 1) >> 24].address[(addr + 1) & map[(addr + 1) >> 24].mask]) << 8) + ((map[(addr + 2) >> 24].address[(addr + 2) & map[(addr + 2) >> 24].mask]) << 16) + ((map[(addr + 3) >> 24].address[(addr + 3) & map[(addr + 3) >> 24].mask]) << 24)) ((map[(addr) >> 24].address[(addr)&map[(addr) >> 24].mask]) + ((map[(addr + 1) >> 24].address[(addr + 1) & map[(addr + 1) >> 24].mask]) << 8) + ((map[(addr + 2) >> 24].address[(addr + 2) & map[(addr + 2) >> 24].mask]) << 16) + ((map[(addr + 3) >> 24].address[(addr + 3) & map[(addr + 3) >> 24].mask]) << 24))

View File

@ -1,7 +1,12 @@
#ifndef EEPROM_H #ifndef EEPROM_H
#define EEPROM_H #define EEPROM_H
#ifndef __LIBRETRO__
#include "../common/cstdint.h" #include "../common/cstdint.h"
#else
#include <stdint.h>
#endif
#include <zlib.h> #include <zlib.h>
#ifdef __LIBRETRO__ #ifdef __LIBRETRO__

View File

@ -1,7 +1,12 @@
#ifndef FLASH_H #ifndef FLASH_H
#define FLASH_H #define FLASH_H
#ifndef __LIBRETRO__
#include "../common/cstdint.h" #include "../common/cstdint.h"
#else
#include <stdint.h>
#endif
#include <zlib.h> #include <zlib.h>
#define FLASH_128K_SZ 0x20000 #define FLASH_128K_SZ 0x20000

View File

@ -1,7 +1,11 @@
#ifndef GBA_H #ifndef GBA_H
#define GBA_H #define GBA_H
#ifndef __LIBRETRO__
#include "../common/cstdint.h" #include "../common/cstdint.h"
#else
#include <stdint.h>
#endif
#include "../System.h" #include "../System.h"

View File

@ -1,6 +1,11 @@
#pragma once #pragma once
#ifndef __LIBRETRO__
#include "../common/cstdint.h" #include "../common/cstdint.h"
#else
#include <stdint.h>
#endif
#include <SFML/Network.hpp> #include <SFML/Network.hpp>
class GBASockClient { class GBASockClient {

View File

@ -1,7 +1,11 @@
#ifndef SRAM_H #ifndef SRAM_H
#define SRAM_H #define SRAM_H
#ifndef __LIBRETRO__
#include "../common/cstdint.h" #include "../common/cstdint.h"
#else
#include <stdint.h>
#endif
uint8_t sramRead(uint32_t address); uint8_t sramRead(uint32_t address);
void sramWrite(uint32_t address, uint8_t byte); void sramWrite(uint32_t address, uint8_t byte);

View File

@ -15,7 +15,6 @@
// along with this program; if not, write to the Free Software Foundation, // along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "../common/cstdint.h"
#include "SoundRetro.h" #include "SoundRetro.h"
#include "libretro.h" #include "libretro.h"
unsigned g_audio_frames; unsigned g_audio_frames;

View File

@ -1,4 +1,3 @@
#include "../common/cstdint.h"
#include <ctype.h> #include <ctype.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>