Some cleanups + we don't need a non-libretro codepath

This commit is contained in:
twinaphex 2021-06-05 20:56:49 +02:00
parent 0acfea1ca9
commit e154706586
7 changed files with 1 additions and 47 deletions

View File

@ -101,12 +101,7 @@ void FCEUI_DisableSpriteLimitation(int a);
/* -1 = no change, 0 = show, 1 = hide, 2 = internal toggle */
void FCEUI_SetRenderDisable(int sprites, int bg);
#ifdef __LIBRETRO__
FCEUGI *FCEUI_LoadGame(const char *name, uint8_t *buf, size_t bufsize);
#else
/* name=path and file to load. returns 0 on failure, 1 on success */
FCEUGI *FCEUI_LoadGame(const char *name);
#endif
#ifdef COPYFAMI
/* Fake UNIF board to start new CFHI instance */
@ -149,9 +144,7 @@ void FCEUI_SetRenderedLines(int ntscf, int ntscl, int palf, int pall);
below this directory. */
void FCEUI_SetBaseDirectory(char *dir);
#ifdef __LIBRETRO__
void FCEUI_SetSaveDirectory(char *sav_dir);
#endif
/* Tells FCE Ultra to copy the palette data pointed to by pal and use it.

View File

@ -188,9 +188,6 @@ static uint32_t Dummy = 0;
static uint32_t current_palette = 0;
static unsigned serialize_size;
int PPUViewScanline=0;
int PPUViewer=0;
/* extern forward decls.*/
extern FCEUGI *GameInfo;
extern uint8 *XBuf;
@ -201,8 +198,6 @@ extern int option_ramstate;
/* emulator-specific callback functions */
void UpdatePPUView(int refreshchr) { }
const char * GetKeyboard(void)
{
return "";
@ -288,9 +283,6 @@ void FCEUD_DispMessage(char *m)
environ_cb(RETRO_ENVIRONMENT_SET_MESSAGE, &msg);
}
void FCEUD_NetworkClose(void)
{ }
void FCEUD_SoundToggle (void)
{
FCEUI_SetSoundVolume(sndvolume);
@ -300,8 +292,7 @@ FILE *FCEUD_UTF8fopen(const char *n, const char *m)
{
if (n)
return fopen(n, m);
else
return NULL;
return NULL;
}
/*palette for FCEU*/

View File

@ -22,11 +22,7 @@
#ifndef __FCEU_TYPES_H
#define __FCEU_TYPES_H
#ifdef __LIBRETRO__
#include <stdint.h>
#else
#include <inttypes.h>
#endif
typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;

View File

@ -81,7 +81,6 @@ extern uint8 PAL;
typedef struct {
int PAL;
int NetworkPlay;
int SoundVolume;
int TriangleVolume;
int SquareVolume[2];

View File

@ -1,28 +1,18 @@
#ifndef _FCEU_FILE_H
#define _FCEU_FILE_H
#ifdef __LIBRETRO__
typedef struct {
uint8 *data;
uint32 size;
uint32 location;
} MEMWRAP;
#endif
typedef struct {
#ifdef __LIBRETRO__
MEMWRAP *fp;
#else
void *fp; /* FILE* or ptr to ZIPWRAP */
#endif
uint32 type; /* 0=normal file, 1=gzip, 2=zip */
} FCEUFILE;
#ifdef __LIBRETRO__
FCEUFILE *FCEU_fopen(const char *path, const char *ipsfn, char *mode, char *ext, uint8 *buffer, size_t bufsize);
#else
FCEUFILE *FCEU_fopen(const char *path, const char *ipsfn, char *mode, char *ext);
#endif
int FCEU_fclose(FCEUFILE*);
uint64 FCEU_fread(void *ptr, size_t size, size_t nmemb, FCEUFILE*);
uint64 FCEU_fwrite(void *ptr, size_t size, size_t nmemb, FCEUFILE*);

View File

@ -32,7 +32,6 @@
#include "general.h"
#include "fceu-endian.h"
#include "fceu-memory.h"
#include "ppuview.h"
#include "cart.h"
#include "palette.h"
@ -1241,7 +1240,6 @@ int FCEUPPU_Loop(int skip) {
for (scanline = 0; scanline < totalscanlines; ) { /* scanline is incremented in DoLine. Evil. :/ */
deempcnt[deemp]++;
/* if ((PPUViewer) && (scanline == PPUViewScanline)) UpdatePPUView(1); */
DoLine();
if (scanline < normal_scanlines || scanline == totalscanlines)
overclocked = 0;

View File

@ -1,13 +0,0 @@
#ifndef _FCEU_PPUVIEW_H
#define _FCEU_PPUVIEW_H
extern int PPUViewScanline;
extern int PPUViewer;
extern int scanline;
void PPUViewDoBlit();
void DoPPUView();
void UpdatePPUView(int refreshchr);
#endif