Commit 69553ca2 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Cleanups

parent 2db3cd9d
Pipeline #67159 passed with stage
in 4 minutes and 21 seconds
......@@ -54,32 +54,6 @@ IDIISG::IDIISG(std::initializer_list<InputDeviceInputInfoStruct> l) : std::vecto
case IDIT_BUTTON_CAN_RAPID:
bit_size = 1;
#if 0
if(idii.Button.ExcludeName)
{
bool found = false;
//printf("%s\n", idii.Button.ExcludeName);
for(auto& idii_sub : *this)
{
if(&idii == &idii_sub || !idii_sub.SettingName)
continue;
if(!strcmp(idii.Button.ExcludeName, idii_sub.SettingName))
{
found = true;
break;
}
}
if(!found)
abort();
}
else if(strstr(idii.SettingName, "up") || strstr(idii.SettingName, "down") || strstr(idii.SettingName, "left") || strstr(idii.SettingName, "right"))
{
printf("Suspicious: %s, %s\n", idii.SettingName, idii.Name);
}
#endif
break;
case IDIT_RESET_BUTTON:
......
......@@ -254,17 +254,6 @@ struct EmulateSpecStruct
// you can ignore this. If you do wish to use this, you must set all elements every frame.
int32 *LineWidths = nullptr;
// Pointer to an array of uint8, 3 * CustomPaletteEntries.
// CustomPalette must be NULL and CustomPaletteEntries mujst be 0 if no custom palette is specified/available;
// otherwise, CustomPalette must be non-NULL and CustomPaletteEntries must be equal to a non-zero "num_entries" member of a CustomPalette_Spec
// entry of MDFNGI::CPInfo.
//
// Set and used internally if driver-side code hasn't specified a non-NULL value for CustomPalette. If driver side uses it, driver side should
// set VideoFormatChanged to true whenever the custom palette changes.
//
uint8 *CustomPalette = nullptr;
uint32 CustomPaletteNumEntries = 0;
// Set(optionally) by emulation code. If InterlaceOn is true, then assume field height is 1/2 DisplayRect.h, and
// only every other line in surface (with the start line defined by InterlacedField) has valid data
// (it's up to internal Mednafen code to deinterlace it).
......@@ -303,14 +292,6 @@ struct EmulateSpecStruct
int64 MasterCycles = 0;
int64 MasterCyclesALMS = 0; // MasterCycles value at last MidSync(), 0
// if mid sync isn't implemented for the emulation module in use.
// True if we want to rewind one frame. Set by the driver code.
bool NeedRewind = false;
// Sound reversal during state rewinding is normally done in mednafen.cpp, but
// individual system emulation code can also do it if this is set, and clear it after it's done.
// (Also, the driver code shouldn't touch this variable)
bool NeedSoundReverse = false;
};
typedef enum
......@@ -323,14 +304,6 @@ typedef enum
MODPRIO_EXTERNAL_HIGH = 40
} ModPrio;
struct CustomPalette_Spec
{
const char* description;
const char* name_override;
unsigned valid_entry_count[32]; // 0-terminated
};
struct GameFile
{
VirtualFS* const vfs;
......@@ -361,24 +334,6 @@ struct DesiredInputType
std::map<std::string, uint32> switches;
};
struct GameDB_Entry
{
std::string GameID;
bool GameIDIsHash = false;
std::string Name;
std::string Setting;
std::string Purpose;
};
struct GameDB_Database
{
std::string ShortName;
std::string FullName;
std::string Description;
std::vector<GameDB_Entry> Entries;
};
typedef struct
{
/* Private functions to Mednafen. Do not call directly
......@@ -405,8 +360,6 @@ typedef struct
#endif
const std::vector<InputPortInfoStruct> &PortInfo;
void (*GetInternalDB)(std::vector<GameDB_Database>* databases);
//
// throws exception on fatal error.
//
......@@ -425,10 +378,6 @@ typedef struct
//
bool (*TestMagic)(GameFile* gf);
//
void* LoadCD_Dummy;
void* TestMagicCD_Dummy;
//
// CloseGame() must only be called after a matching Load() or LoadCD() completes successfully. Calling it before Load*(), or after Load*() throws an exception or
// returns error status, may cause undesirable effects such as nonvolatile memory save game file corruption.
......@@ -441,11 +390,6 @@ typedef struct
void (*SetChanEnableMask)(uint64 mask); // Audio(TODO, placeholder)
const char *ChanNames;
const CustomPalette_Spec* CPInfo; // Terminated by a { NULL, NULL } entry. Effective maximum of 64 possible custom palettes(due to CPInfoActiveBF).
uint64 CPInfoActiveBF; // 1 = 0, 2 = 1, 4 = 2, 8 = 3, etc. (to allow for future expansion for systems that might need
// multiple custom palette files, without having to go back and restructure this data).
const CheatInfoStruct& CheatInfo;
bool SaveStateAltersState; // true for bsnes and some libco-style emulators, false otherwise.
......@@ -461,8 +405,6 @@ typedef struct
void (*StateAction)(StateMem *sm, const unsigned load, const bool data_only);
void (*Emulate)(EmulateSpecStruct *espec);
void (*TransformInput)(void); // Called before Emulate, and within MDFN_MidSync(), to implement stuff like setting-controlled PC Engine SEL+RUN button exclusion in a way
// that won't cause desyncs with movies and netplay.
void (*SetInput)(unsigned port, const char *type, uint8* data);
void (*SetMedia)(uint32 drive_idx, uint32 state_idx, uint32 media_idx, uint32 orientation_idx);
......@@ -536,6 +478,4 @@ typedef struct
}
//#include "file.h"
#endif
......@@ -242,9 +242,6 @@ void MDFN_MidSync(EmulateSpecStruct *espec, const unsigned flags)
espec->SoundBufSizeALMS = espec->SoundBufSize;
espec->MasterCyclesALMS = espec->MasterCycles;
if((flags & MIDSYNC_FLAG_UPDATE_INPUT) && MDFNGameInfo->TransformInput) // Call after MDFND_MidSync, and before MDFNMOV_ProcessInput
MDFNGameInfo->TransformInput();
}
void MDFN_MidLineUpdate(EmulateSpecStruct *espec, int y)
......@@ -281,11 +278,6 @@ void MDFNI_Emulate(EmulateSpecStruct *espec)
last_sound_rate = espec->SoundRate;
}
if(MDFNGameInfo->TransformInput)
MDFNGameInfo->TransformInput();
espec->NeedSoundReverse = false; //MDFNSRW_Frame(espec->NeedRewind);
MDFNGameInfo->Emulate(espec);
if(espec->InterlaceOn)
......
......@@ -47,8 +47,6 @@ enum MDFNSettingType
};
//#define MDFNST_EX_DRIVER = (1U << 16), // If this is not set, the setting is assumed to be internal. This...should probably be set automatically?
#define MDFNSF_NOFLAGS 0U // Always 0, makes setting definitions prettier...maybe.
// TODO(cats)
......
......@@ -947,12 +947,11 @@ static void Emulate(EmulateSpecStruct* espec)
{
EmulateSpecStruct tmp_espec = *espec;
if(espec->SoundFormatChanged || espec->NeedSoundReverse)
if(espec->SoundFormatChanged)
SpecExAudioExpected = -1;
tmp_espec.skip = -1;
assert(tmp_espec.skip == -1);
tmp_espec.NeedSoundReverse = false;
tmp_espec.VideoFormatChanged = false;
tmp_espec.SoundFormatChanged = false;
......@@ -1240,11 +1239,8 @@ MDFNGI EmulatedSNES_Faust =
NULL,
#endif
INPUT_PortInfo,
NULL,
Load,
TestMagic,
NULL,
NULL,
CloseGame,
NULL, //ToggleLayer,
......@@ -1253,15 +1249,11 @@ MDFNGI EmulatedSNES_Faust =
NULL,
NULL,
NULL,
0,
CheatInfo,
false,
StateAction,
Emulate,
NULL,
SetInput,
NULL,
DoSimpleCommand,
......
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