mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-12-04 07:31:39 +00:00
Header cleanups + getting rid of IsAbsolutePath - using libretro-common
equivalent
This commit is contained in:
parent
0c191c231d
commit
839e620c73
@ -2,6 +2,7 @@
|
|||||||
#include "mednafen/mempatcher.h"
|
#include "mednafen/mempatcher.h"
|
||||||
#include "mednafen/git.h"
|
#include "mednafen/git.h"
|
||||||
#include "mednafen/general.h"
|
#include "mednafen/general.h"
|
||||||
|
#include "mednafen/settings.h"
|
||||||
#include <compat/msvc.h>
|
#include <compat/msvc.h>
|
||||||
#include "mednafen/psx/gpu.h"
|
#include "mednafen/psx/gpu.h"
|
||||||
#ifdef NEED_DEINTERLACER
|
#ifdef NEED_DEINTERLACER
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "MemoryStream.h"
|
#include "MemoryStream.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include <compat/msvc.h>
|
#include <compat/msvc.h>
|
||||||
|
#include "math_ops.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TODO:
|
TODO:
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
#ifndef _MDFN_DRIVERH
|
|
||||||
#define _MDFN_DRIVERH
|
|
||||||
|
|
||||||
#include "mednafen-types.h"
|
|
||||||
#include "git.h"
|
|
||||||
#include "mednafen-driver.h"
|
|
||||||
#include "mempatcher-driver.h"
|
|
||||||
|
|
||||||
#endif
|
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <file/file_path.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boolean.h>
|
#include <boolean.h>
|
||||||
@ -26,31 +28,11 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "mednafen.h"
|
#include "mednafen.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
#include "settings.h"
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
static bool IsAbsolutePath(const char *path)
|
|
||||||
{
|
|
||||||
if (
|
|
||||||
#ifdef _WIN32
|
|
||||||
path[0] == '\\' ||
|
|
||||||
#endif
|
|
||||||
path[0] == '/'
|
|
||||||
)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(DOS)
|
|
||||||
if((path[0] >= 'a' && path[0] <= 'z') || (path[0] >= 'A' && path[0] <= 'Z'))
|
|
||||||
{
|
|
||||||
if(path[1] == ':')
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MDFN_IsFIROPSafe(const std::string &path)
|
bool MDFN_IsFIROPSafe(const std::string &path)
|
||||||
{
|
{
|
||||||
// We could make this more OS-specific, but it shouldn't hurt to try to weed out usage of characters that are path
|
// We could make this more OS-specific, but it shouldn't hurt to try to weed out usage of characters that are path
|
||||||
@ -140,8 +122,8 @@ std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_pat
|
|||||||
if(!skip_safety_check && !MDFN_IsFIROPSafe(rel_path))
|
if(!skip_safety_check && !MDFN_IsFIROPSafe(rel_path))
|
||||||
throw MDFN_Error(0, "Referenced path \"%s\" is potentially unsafe. See \"filesys.untrusted_fip_check\" setting.\n", rel_path.c_str());
|
throw MDFN_Error(0, "Referenced path \"%s\" is potentially unsafe. See \"filesys.untrusted_fip_check\" setting.\n", rel_path.c_str());
|
||||||
|
|
||||||
if(IsAbsolutePath(rel_path.c_str()))
|
if (path_is_absolute(rel_path.c_str()))
|
||||||
return(rel_path);
|
return rel_path;
|
||||||
return(dir_path + slash + rel_path);
|
return(dir_path + slash + rel_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
|
|
||||||
#include "video.h"
|
#include "video/surface.h"
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -228,15 +228,6 @@ typedef struct
|
|||||||
// performance possible. HOWEVER, emulation modules must make sure the value is in a range(with minimum and maximum) that their code can handle
|
// performance possible. HOWEVER, emulation modules must make sure the value is in a range(with minimum and maximum) that their code can handle
|
||||||
// before they try to handle it.
|
// before they try to handle it.
|
||||||
double soundmultiplier;
|
double soundmultiplier;
|
||||||
|
|
||||||
// True if we want to rewind one frame. Set by the driver code.
|
|
||||||
bool NeedRewind;
|
|
||||||
|
|
||||||
// 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;
|
|
||||||
|
|
||||||
} EmulateSpecStruct;
|
} EmulateSpecStruct;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -295,11 +286,6 @@ typedef struct
|
|||||||
VideoSystems VideoSystem;
|
VideoSystems VideoSystem;
|
||||||
GameMediumTypes GameType;
|
GameMediumTypes GameType;
|
||||||
|
|
||||||
//int DiskLogicalCount; // A single double-sided disk would be 2 here.
|
|
||||||
//const char *DiskNames; // Null-terminated.
|
|
||||||
|
|
||||||
const char *cspecial; /* Special cart expansion: DIP switches, barcode reader, etc. */
|
|
||||||
|
|
||||||
// For absolute coordinates(IDIT_X_AXIS and IDIT_Y_AXIS), usually mapped to a mouse(hence the naming).
|
// For absolute coordinates(IDIT_X_AXIS and IDIT_Y_AXIS), usually mapped to a mouse(hence the naming).
|
||||||
float mouse_scale_x, mouse_scale_y;
|
float mouse_scale_x, mouse_scale_y;
|
||||||
float mouse_offs_x, mouse_offs_y;
|
float mouse_offs_x, mouse_offs_y;
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
#ifndef __MDFN_MEDNAFEN_DRIVER_H
|
|
||||||
#define __MDFN_MEDNAFEN_DRIVER_H
|
|
||||||
|
|
||||||
#include <libretro.h>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
void MDFND_DispMessage(
|
|
||||||
unsigned priority, enum retro_log_level level,
|
|
||||||
enum retro_message_target target, enum retro_message_type type,
|
|
||||||
const char *msg);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
void MDFN_DispMessage(
|
|
||||||
unsigned priority, enum retro_log_level level,
|
|
||||||
enum retro_message_target target, enum retro_message_type type,
|
|
||||||
const char *format, ...);
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -2,17 +2,12 @@
|
|||||||
#define _MEDNAFEN_H
|
#define _MEDNAFEN_H
|
||||||
|
|
||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
|
|
||||||
#include "mednafen-types.h"
|
#include "mednafen-types.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define _(String) (String)
|
#define _(String) (String)
|
||||||
|
|
||||||
#include "math_ops.h"
|
|
||||||
#include "git.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
#endif
|
#endif
|
||||||
@ -28,10 +23,6 @@
|
|||||||
#define GET_FSIZE_PTR(fp) (fp->size)
|
#define GET_FSIZE_PTR(fp) (fp->size)
|
||||||
#define GET_FEXTS_PTR(fp) (fp->ext)
|
#define GET_FEXTS_PTR(fp) (fp->ext)
|
||||||
|
|
||||||
extern MDFNGI *MDFNGameInfo;
|
|
||||||
|
|
||||||
#include "settings.h"
|
|
||||||
|
|
||||||
void MDFND_DispMessage(
|
void MDFND_DispMessage(
|
||||||
unsigned priority, enum retro_log_level level,
|
unsigned priority, enum retro_log_level level,
|
||||||
enum retro_message_target target, enum retro_message_type type,
|
enum retro_message_target target, enum retro_message_type type,
|
||||||
@ -51,6 +42,4 @@ void MDFN_DispMessage(
|
|||||||
void MDFN_LoadGameCheats(void *override);
|
void MDFN_LoadGameCheats(void *override);
|
||||||
void MDFN_FlushGameCheats(int nosave);
|
void MDFN_FlushGameCheats(int nosave);
|
||||||
|
|
||||||
#include "mednafen-driver.h"
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "mednafen.h"
|
#include "mednafen.h"
|
||||||
|
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
#include "settings.h"
|
||||||
#include "mempatcher.h"
|
#include "mempatcher.h"
|
||||||
|
|
||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "../state_helpers.h"
|
#include "../state_helpers.h"
|
||||||
#include "../math_ops.h"
|
#include "../math_ops.h"
|
||||||
|
#include "../mednafen.h"
|
||||||
#include "../mednafen-endian.h"
|
#include "../mednafen-endian.h"
|
||||||
|
|
||||||
// iCB: PGXP STUFF
|
// iCB: PGXP STUFF
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "../frontio.h"
|
#include "../frontio.h"
|
||||||
#include "dualshock.h"
|
#include "dualshock.h"
|
||||||
|
|
||||||
|
#include "../../mednafen.h"
|
||||||
#include "../../mednafen-endian.h"
|
#include "../../mednafen-endian.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <libretro.h>
|
#include <libretro.h>
|
||||||
|
|
||||||
#include "mednafen-driver.h"
|
#include "mednafen.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
int setting_initial_scanline = 0;
|
int setting_initial_scanline = 0;
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
#ifndef __MDFN_VIDEO_H
|
|
||||||
#define __MDFN_VIDEO_H
|
|
||||||
|
|
||||||
#include <libretro.h>
|
|
||||||
|
|
||||||
#include "video/surface.h"
|
|
||||||
|
|
||||||
void MDFND_DispMessage(
|
|
||||||
unsigned priority, enum retro_log_level level,
|
|
||||||
enum retro_message_target target, enum retro_message_type type,
|
|
||||||
const char *msg);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
void MDFN_DispMessage(
|
|
||||||
unsigned priority, enum retro_log_level level,
|
|
||||||
enum retro_message_target target, enum retro_message_type type,
|
|
||||||
const char *format, ...);
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,8 +1,8 @@
|
|||||||
#include "../mednafen.h"
|
#include "../mednafen.h"
|
||||||
#include "../video.h"
|
|
||||||
#include "../general.h"
|
#include "../general.h"
|
||||||
#include "../state.h"
|
#include "../state.h"
|
||||||
#include "../driver.h"
|
|
||||||
|
#include "surface.h"
|
||||||
|
|
||||||
extern "C" uint8_t psx_gpu_upscale_shift;
|
extern "C" uint8_t psx_gpu_upscale_shift;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user